brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
| var activity = Ti.Android.currentActivity; | |
| var win = Ti.UI.currentWindow; | |
| activity.addEventListener("create", function(e) { | |
| var button = Ti.UI.createButton({title: "Hello world"}); | |
| button.addEventListener("click", function(e) { | |
| activity.finish(); | |
| }); | |
| win.add(button); | |
| }); |
| location /resize { | |
| alias /tmp/nginx/resize; | |
| set $width 150; | |
| set $height 100; | |
| set $dimens ""; | |
| if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) { | |
| set $width $1; | |
| set $height $2; | |
| set $image_path $3; |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
| <?php | |
| // API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = array( $_GET['id'] ); | |
| // prep the bundle | |
| $msg = array |
| /** | |
| * ValidateSpanishID. Returns the type of document and checks its validity. | |
| * | |
| * Usage: | |
| * ValidateSpanishID( str ); | |
| * | |
| * > ValidateSpanishID( '12345678Z' ); | |
| * // { type: 'dni', valid: true } | |
| * | |
| * > ValidateSpanishID( 'B83375575' ); |
SSH into your EC2 instance. Run the following:
$ sudo yum install gcc This may return an "already installed" message. That's OK.
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/usr/bin/node | |
| /** | |
| * Trello task description: https://trello.com/jobs/developer | |
| */ | |
| /** | |
| * @function hash Create hash from string | |
| * @param {String} str String to hash | |
| * @return {Number} hash | |
| */ |
| var http = require('http'), | |
| ipReg = /\api\/v1\/ip\/(\w+)/, | |
| iplookup = require( './lib/iplookup' ); | |
| http.createServer(function (req, res) { | |
| var ip = req.url.match( ipReg ); | |
| if( !ip ) | |
| { | |
| res.writeHead(404, {'Content-Type': 'text/html'}); |