Keybase proof
I hereby claim:
- I am noumansaleem on github.
- I am nouman (https://keybase.io/nouman) on keybase.
- I have a public key whose fingerprint is D55A EA69 F408 B91F 4C5A 2208 4215 3043 A80D 37FD
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# Windows AMIs don't have WinRM enabled by default -- this script will enable WinRM | |
# AND install 7-zip, curl and .NET 4 if its missing. | |
# Then use the EC2 tools to create a new AMI from the result, and you have a system | |
# that will execute user-data as a PowerShell script after the instance fires up! | |
# This has been tested on Windows 2008 SP2 64bits AMIs provided by Amazon | |
# | |
# Inject this as user-data of a Windows 2008 AMI, like this (edit the adminPassword to your needs): | |
# | |
# <powershell> | |
# Set-ExecutionPolicy Unrestricted |
function keyToRegExp(key) { | |
return new RegExp(':(' + key + ')(?:\\(([^\\(]+)\\))?'); | |
} | |
function link(url, params) { | |
return Object.keys(params).reduce(function (url, key) { | |
url = url.replace(keyToRegExp(key), params[key]); | |
return url; | |
}, url); | |
} |
'use strict'; | |
(function (angular) { | |
function tokenToRegExp(token) { | |
return new RegExp(':(' + token + ')(?:\\(([^\\(]+)\\))?'); | |
} | |
angular.module('fdNamedRoutes', []) | |
.provider('namedRouteProvider', ['$locationProvider', function namedRouteProvider($locationProvider) { |
# Install homebrew | |
echo 'Install Homebrew' | |
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go) | |
# Install node.js | |
echo 'Install node.js' | |
brew install node | |
# Npm without sudo | |
sudo chown -R `whoami` ~/.npm |
.squared { position: relative; display: block; overflow: hidden; padding-top: 100%; } | |
.squared > img { position: absolute; top: 0; } | |
.squared.background { background-size: 100%; background-size: cover; background-position: center; } | |
.squared.background > img { opacity: 0; } |
{ | |
"requireCurlyBraces": ["else", "for", "while", "do", "try", "catch"], | |
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], | |
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true }, | |
"disallowSpacesInsideArrayBrackets": true, | |
"disallowSpacesInsideParentheses": true, | |
"requireSpacesInsideObjectBrackets": "allButNested", | |
"disallowSpaceAfterObjectKeys": true, | |
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], | |
"requireRightStickedOperators": ["!"], |
# From: https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Increase sound quality for Bluetooth headphones/headsets | |
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 |
/* | |
Usage: | |
Var Validator = require('path-To-Your/lib/validator'), | |
validator = new Validator(); | |
validator.checkField('first_name', 'foo', { | |
isNumeric: 'This is not a number', | |
contains: 'The value doesn\'t have a 0 in it' |