This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function(e) { | |
| if(!e) var e = window.event; | |
| var posx = 0; | |
| var posy = 0; | |
| if (e.pageX || e.pageY) { | |
| posx = e.pageX; | |
| posy = e.pageY; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.directive('xs-enter', function () { | |
| return function (scope, element, attrs) { | |
| element.bind("keydown keypress", function (event) { | |
| event.preventDefault(); | |
| if(event.which === 13) { | |
| scope.$apply(function (){ | |
| scope.$eval(attrs.xsEnter); | |
| }); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # open simulatro | |
| open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
| # simbolic link to desktop | |
| ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app ~/Desktop | |
| # or use this to run as -> $ simulator | |
| alias simulator='open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSDictionary *data = | |
| [NSJSONSerialization JSONObjectWithData: [@"{\"a\":\"A\", \"b\":\"B\"}" dataUsingEncoding:NSUTF8StringEncoding] | |
| options: NSJSONReadingMutableContainers | |
| error: nil]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/ssh | |
| # message colors | |
| GREEN='\033[0;32m' | |
| CYAN='\033[0;36m' | |
| NONE='\033[0m' | |
| # npm it | |
| # Install Dev Tools - Express, React, Bower, Nodemon, Node Inspector |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| echo Install Homebrew, Postgres, wget and cask | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| # Development | |
| brew install node | |
| brew install go | |
| brew install dep # dep manager for go | |
| brew install python3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "name": "Alabama", | |
| "abbreviation": "AL", | |
| "id": "AL" | |
| }, | |
| { | |
| "name": "Alaska", | |
| "abbreviation": "AK", | |
| "id": "AK" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| name: 'Alabama', | |
| abbreviation: 'AL', | |
| id: 'AL' | |
| }, | |
| { | |
| name: 'Alaska', | |
| abbreviation: 'AK', | |
| id: 'AK' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // bower install crypto-js | |
| // Add to scripts to html file | |
| // <script src="bower_components/crypto-js/crypto-js.js"></script> | |
| // <script src="bower_components/crypto-js/pbkdf2.js"></script> | |
| function auth(password) { | |
| // Make a salt with CryptoJS.lib.WordArray.random(128/8); | |
| var salt = 'your salt'; // CryptoJS.lib.WordArray.random(128/8); | |
| // 1000 iterations takes a couple seconds in the browser. Wouldn't want to go much higher if this is a browser implementation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Solution as found in - http://tympanus.net/codrops/2015/09/15/styling-customizing-file-inputs-smart-way/ --> | |
| <style> | |
| .inputfile { | |
| width: 0.1px; | |
| height: 0.1px; | |
| opacity: 0; | |
| overflow: hidden; | |
| position: absolute; | |
| z-index: -1; |
OlderNewer