Posts

Showing posts from 2017

Removing the Cloud

Image
Can't remember if I've talked about with this before in my blog, it's been a while. Mainly because I've been working towards this idea. Rather than building a social network I've instead moved on to doing the whole cloud myself. Removing Google, Amazon, and Microsoft from my life, I would encourage others but that's wishful thinking. Instead I'm just doing my own thing. Got myself a server and moved all my applications out of the cloud. Of course some of the stuff I use are hard to move like this blog but for everything else I'm completely independent.    For a lot of people this might seem a strange time to do this, with cloud computing becoming cheaper and easier. I see the writing on the wall. Obvious reason, my competitive business model, with the big three companies. Its becoming more important for me to move out of the cloud. So even if I wasn't already worried or paranoid as some might call it about my code. I'm already competing

Accessibility Designing

One of the standards that I'm adapting on my own with real interest is handling accessibility for all my major applications. I like to think of printing last as a concern. I think the best practice that I've come up with helping me get in the habit is during the initial color design. Since I may or may not be slight color blind and hear way to often my colors are too light or don't match. I think matching part just comes from the fact I don't understand fashion. Which is why I was the same outfit, you can't mess up with khakis. In other words getting the habit is much the same with my applications with a little variety here and there. I'm not going for anything bold just modern, so here are the tools I use. Tools Contrast Ratio: Easily calculate color contrast ratios. Passing WCAG was never this easy! Accessibility Developer Tools - Chrome Web Store just a bit of caution don't solely depend on this, just like the mobile view in chrome

Bugging Out About Code

Its one battle after another battle and not one you can always win. I've watched good ideas die before they even had a chance but even worse bad ideas take over development. Its a difficult thing to watch. I think the most important things on how to approaching this issue comes down to these points. Encouraging & passinate work environment. people who don't understand will try and want to here. Strong co-worker relationship working alone is nice but teams should come together on certain projects or piceces of code. Clear Objective goals If you can't get support from your team/manager then use deadlines to beat the competition.  It gets harder at this point to not just complain about things or talk about my experience. Whic think could give some insight. Instead I'll just follow my last point and and the article with this. Passion is never a negative and there's always another problem to be solve so don't burn yourself out.

Not just Open Source, but Something a little more

For the most difficult parts of my career I have pushed for open source among my peers. The number one benfit being standardized code, a benefit for everyone involved. I've even drawn  a fine line for everyone I'm come across with to make it simple. If a user can see your code they can take it, so why not improve it with the help of others. Let others improve upon it or poke holes in it. I've also pointed out to nay sayers that it is a good idea not to make your code specific to an application's needs. Aboid sensitive information that can get tangled inside your logic. Separate it, mask and encrypt it do whatever you got to do. As for frontend code in the modern world, its like writting a book. Your core will be read by someone. If it's good enough people will repeat it. Which is what you should want, Just like books some of the pages are unnecessary or fill up the book with more context which can tie it down. Its on that idea why I adopted other people's code

Android Cheatsheet

The best part about android now days is how easy firebase makes things. I could probably just get rid of all my notes and just list off all the firebase examples I used in the past but I think in the future I will have a few projects non-firebase. http://www.gradle.org/ http://stackoverflow.com/questions/16718026/how-to-build-an-android-library-with-android-studio-and-gradle http://stackoverflow.com/questions/26554996/change-toolbar-color-in-appcompat-21 http://stackoverflow.com/questions/5861661/actionbar-text-color http://stackoverflow.com/questions/13724007/how-to-send-notifications-from-a-website-to-an-android-app https://github.com/jreyes/UdacityXYZReader http://www.recursiverobot.com/post/60331340133/very-simple-example-of-a-loader-and-loadermanager http://stackoverflow.com/questions/22821139/how-should-i-track-fragments-in-google-analytics-v4 http://stackoverflow.com/questions/25381435/unconditional-layout-inflation-from-view-adapter-should-use-view-holder-patter ht

Angular Cheatsheet

http://stackoverflow.com/questions/13743058/how-do-i-access-the-scope-variable-in-browsers-console-using-angularjs https://stackoverflow.com/questions/15529496/a-way-to-know-when-angular-http-is-requesting https://stackoverflow.com/questions/18961332/angular-ui-router-show-loading-animation-during-resolve-process http://stackoverflow.com/questions/18646756/how-to-run-function-in-angular-controller-on-document-ready http://angularjs.blogspot.com/2014/03/angular-20.html https://www.airpair.com/angularjs/posts/top-10-mistakes-angularjs-developers-make http://stackoverflow.com/questions/15671471/angular-js-how-does-eval-work-and-why-is-it-different-from-vanilla-eval http://www.linkplugapp.com/a/1412749?utm_content=buffer7f89b&utm_medium=social&utm_source=linkedin.com&utm_campaign=buffer https://docs.angularjs.org/api/ng/directive/script http://www.pluralsight.com/courses/angularjs-dotnet-developers http://codepen.io/mcfoster/pen/vEgOoJ/ http://ghost.scriptwer

Aspnet MVC Cheatsheet

Probably the best place to start with this cheatsheet is with this blog itself. I have tons of articles under my tags "aspnet" and "aspnet-mvc" on this blog. Since aspnet is where I started in my career its probably the most important cheatsheet I should have ready. This article will always be on going... Assigning and Setting Bound models some of my notes here include javascript because so much of my code is, but you need to be aware how it ties in with the backend. Accessing Your Model's Data from a Controller Microsoft Workers Worry Most About Re-Org - Dice News Use View Models instead of FormCollection - Jaco Pretorius Assign Model property value from JavaScript value MVC 3 form post and persisting model data Setting property on the model object? (javascript) Controller without a form? Sending JSON to an ASP.NET MVC Action Method Argument JSON.stringify not converting array.object correctly (javascript) associative array to JSON (javascri

Linux Cheatsheet

With everything going on with logicoma, I will be frequently updating this page so I can just jump back into whatever system tasks at hand. I should add this I'm going to keep this focused on ubuntu/debian. http://www.yolinux.com/TUTORIALS/LinuxTutorialAdditionalHardDrive.html http://www.cyberciti.biz/faq/linux-viewing-drive-partitions-with-fdisk-parted/ X11 Forwarding using Putty on Windows - YouTube Storage http://tldp.org/LDP/lame/LAME/linux-admin-made-easy/checking-storage-space.html https://www.cyberciti.biz/faq/linux-check-memory-usage https://unix.stackexchange.com/questions/106561/finding-the-pid-of-the-process-using-a-specific-port Commands fdisk -l mkdir ← a directoy of where to mount the disk mount ← mount a disk using /dev/[disk] ln ← creates a link file from another name ← use 'a' to get all the information on the server rm /path/to/directory/* https://askubuntu.com/questions/402589/the-following-packages-were-automatical

Javascript Cheatsheet

At times I do still just use pure javascript and nothing else because how small I want the project to be. As always more coming soon... JavaScript best practices 19+ JavaScript Shorthand Coding Techniques Best way to find an item in a JavaScript array? - Stack Overflow Replace multiple whitespaces with single whitespace in JavaScript string - Stack Overflow javascript - How can I disable highlighting in html or JS? - Stack Overflow javascript - drag and drop, prevent awkward highlighting? - Stack Overflow Basic Json Request Using XMLHttpRequest Performance    There is a lot of talking about how to test the real performance of javascript and for the most part I have no clue where to start as I write this. Hopefully that will change be the end, skip to it if you dont want to learn the process as well. http://stackoverflow.com/questions/1003855/howto-benchmark-javascript-code Fun Example  function DisplayQuestions() { var Questions = new Array(20); Questions[

EF6 Cheatsheet

Image
When I was first learning EF I tried using model first however migrations and the setup to handle it was too buggy. I'm sure I could have gotten it in time but I've learned right way the importance of being a good dba. Performance Considerations for EF 4, 5, and 6 Entity Framework - Entity Framework 6: The Ninja Edition Best practices to improve Entity Framework performance | InfoWorld Tips to improve Entity Framework Performance EntityFramework Performance and AutoDetectChanges RoleEntryPoint Class (Microsoft.WindowsAzure.ServiceRuntime) <sessionState> Element using Statement (C# Reference) More coming soon

IIS Cheatsheet

Setting up a website in iis is pretty easy and its where I'm most comfortable doing my professionally work. However with newer frameworks I'm look outside of iis because of the non-window based servers. So this cheatsheet is even better because I'm sure it will be a long time before convince my peers to use linux. Server Error: HTTP Error 500.19 - Internal Server Error ASP.NET IIS Registration Tool (Aspnet_regiis.exe) How to Configure HTTP Access to SQL Server 2008 Analysis Services on IIS7 Reverse Proxy with URL Rewrite v2 and Application Request Routing Security & Users What are all the user accounts for IIS/ASP.NET and how do they differ? Solution iis 7 - IIS7 Permissions Overview - ApplicationPoolIdentity http://msdn.microsoft.com/en-us/library/k6h9cz8h(v=vs.80).aspx ssl - IIS process cannot access file in use - Stack Overflow Side note Installing and Running node.js applications within IIS on Windows Run IIS + ASP.NET on Windows 10 with

C++/C Cheatsheet

I really should have more notes on this but I haven't touched c++ this year. Last year I had more projects to help this but I've put them off until I finish a few projects using python. Beep your PC speaker in linux » LinuxPlayer | LinuxPlayer UNIX programming examples The GNU C Library Beep for Linux and Windows Linux Signals – Example C Program to Catch Signals (SIGINT, SIGKILL, SIGSTOP, etc.) The GNU C Library - Table of Contents system - C++ Reference https://stackoverflow.com/questions/3878303/c-udp-socket-port-multiplexing Other Notes SLIDE Pipeline Assignment 5 OpenGL Mathematics Generalized linear model Data Type (GLSL) - OpenGL.org opengl - Rotate an object given only by its points? http://www.boost.org/doc/libs/1_39_0/libs/smart_ptr/scoped_ptr.htm

Sql Cheatsheet

After my first job I realized the importance of learning a bit about it all. None should be in the dark when it comes to their website. I might not be a master of relational databases but give me a mongodb or reddis and even a firebase database any day. Still some projects are dependent on mysql and etc so I have enough info to help me move forward. Nothing I had more than a dba or team who locks me out. Throw exception from SQL Server function to stored procedure - Stack Overflow HOW TO: Return Errors and Warnings from a SQL Server Stored Procedure in ADO.NET RAISERROR (Transact-SQL) SQL server management studio local database connection error in windows 7 Visual Studio Database Guide - Home How to: Use Source Control with SQL Server Management Studio mysql - Sending multiple data parameters with jQuery AJAX sql server - Inserting multiple rows in a single SQL query? LuaSQL: Database connectivity for the Lua programming language DECLARE @local_variable (Transact-SQL) Pa

Certificate Providers & ISPs

This was just a question I always wondered and a topic I'v been fascinated by. I think a lot of information out there is obscured and this done so purposefully. Its such a tough market but once your in your in. Certificates Becoming a X.509 Certificate Authority How can my organization become a Root CA? As a ISP company Start an ISP WiMAX leased-line-buyers-guide Satellite_phone Who provides the Internet service to Internet Service Providers (ISPs)? Similar Businesses http://www.level3.com/en/ https://arstechnica.com/business/2014/04/one-big-reason-we-lack-internet-competition-starting-an-isp-is-really-hard/2/ http://www.giglinx.com/index.html http://www.dslreports.com/forum/r18672709-is-it-possible-to-be-your-own-ISP http://en.wikipedia.org/wiki/Tier_1_network http://drpeering.net/FAQ/Who-are-the-Tier-1-ISPs.php

Jquery Cheatsheet

Time to time I still use jquery and honestly don't have too many complaints about using jquery over more modern frameworks. Either way keep coming back to this page for reminders or small bugs in my code that I forget to add. I think the best approach for anyone is to create plugins for their needs and just keep expending around that. Javascript - Event order lightbox for images, videos, YouTube, iframes, ajax deferred.always() | jQuery API Documentation .trigger() | jQuery API Documentation jQuery advantages/differences in .trigger() vs .click() - Stack Overflow jQuery BlockUI Plugin How to detect pressing enter on keyboard using jquery? - Stack Overflow jquery - Last element in .each() set - Stack Overflow jQuery event.preventDefault() not working in Firefox (JSFiddle included) jquery - Checking to see if AJAX response is empty and other problems javascript - jQuery's $(form).submit() not firing for IE only (MVC3 app) javascript - How can I refresh a page with

Travis-Ci & Saucelabs Environment Variables

Firebase's example on how to auto deploy with Travis shows us a more secure way rather than how I did.  fassetar/jquery-maskmoney  if I can create a similar approach with this project I would feel better about the security. https://github.com/fassetar/site/blob/master/.travis.yml https://github.com/fassetar/jquery-maskmoney/blob/master/.travis.yml https://docs.travis-ci.com/user/environment-variables/ https://docs.travis-ci.com/user/encryption-keys/ https://saucelabs.com/platforms More coming soon...

Presteps to Making My Own CMS Part II

Before I try to create my own cms I looked recreating  some middlware for blogger. To be clear I didn't create my own database layer simple used Oauth and the blogger api's with a re-skinned UI/UX using Material Angular. I also created some tools for myself awhile I'm using the app and started creating a backup on github process like I talked about a few years back. http://stackoverflow.com/questions/31915099/how-do-i-get-an-instance-of-iappbuilder-elsewhere-in-my-asp-net-mvc-5-2-3-applic  http://stackoverflow.com/questions/32501238/how-exactly-iappbuilder-createperowincontextt-should-be-used/36044219#36044219  http://stackoverflow.com/questions/19669125/send-receive-email-with-google-oauth-2-and-asp-net-mvc https://www.asp.net/downloads/starter-kits/blog-engine

Powershell Cheatsheet

   One of the things that I have been getting use to is powershell, I'm not a server administrator.  Or at least if I'm going to be one I prefer linux. Most of my server are and I'm going to have a update here once I get my lab setup. For now this is how I manage my job and correct the systems that have gone wild. http://www.anotherchris.net/misc/starting-and-stopping-all-iis-sites-in-powershell/ http://stackoverflow.com/a/21674873/1265036 https://social.technet.microsoft.com/Forums/windows/en-US/be3afe83-4a7e-48a0-b2e7-95fd081a7571/login-to-website-using-powershell?forum=winserverpowershell http://stackoverflow.com/a/25035181/1265036 http://stackoverflow.com/questions/15528492/display-all-sites-and-bindings-in-powershell https://stackoverflow.com/questions/12789516/powershell-download-files-from-url-that-does-not-include-file-name-in-the-ur https://stackoverflow.com/questions/6204003/kill-a-process-by-looking-up-the-port-being-used-by-it-from-a-bat https://sta

Make Promises to Your Work Not Your Employer

Image
   I've learned a lot in the past x amount years or whatever I'm not keeping track anymore. For the most part I've learned that I've been doing works. On that part I think I've made some good decisions. For the things I've got wrong I believe its just a matter of how I approached them. Mostly so I believe it was a lack of confident that played into other people's favor. Recently I've no longer allowed this to be an acceptable approach for people to take as my decisions are final. It is just as easy for me to move on rather than work around something in a project because of another developer's difficultly to agree with me.  Regardless how people see me or if they understand my method I only have one bit of wisdom to pass on to next generation. Which is lazy people will lie and will continue to lie to you regardless if you have evidence of better way. For years its confused me on why lazy people sell themselves better and its because its a simpler app

Git Cheatsheet

I'm always handling the code wherever I go so maybe its time I shared my notes. I'm really surprised but I should with my experience how many developers don't know git. msysgit - git: 'credential-cache' is not a git command How do I update the password for Git? How do you attach a new pull request to an existing issue on github Squash commits! I'm always forgetting this and its really simple to do if you remember both commands. git rebase -i xxxxxxxxxxxxxxxx git push --force origin master "where xxxxxxxxxx is the SHA of the commit upto which I've to squash" .  Get username git config user.name Change Email git config user.email Caching Password on Windows. git config --global credential.helper wincred More coming soon...