Skip to content

Instantly share code, notes, and snippets.

Nouman Saleem NoumanSaleem

Block or report user

Report or block NoumanSaleem

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am noumansaleem on github.
  • I am 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:

View Bootstrap-EC2-Windows-CloudInit.ps1
# 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
View link.js
NoumanSaleem / namedRoutes.js
Created Sep 17, 2014
named routes in angular (directive and filter)
View namedRoutes.js
'use strict';
(function (angular) {
function tokenToRegExp(token) {
return new RegExp(':(' + token + ')(?:\\(([^\\(]+)\\))?');
angular.module('fdNamedRoutes', [])
.provider('namedRouteProvider', ['$locationProvider', function namedRouteProvider($locationProvider) {
NoumanSaleem /
Last active Aug 29, 2015
Mac setup bash script.Usage: Save file and open a terminal window in the same directory. Run: source (Change to w/e you saved the file as.)
# Install homebrew
echo 'Install Homebrew'
ruby <(curl -fsSkL
# Install node.js
echo 'Install node.js'
brew install node
# Npm without sudo
sudo chown -R `whoami` ~/.npm
View squared.css
.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; }
View .jscs.json
"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": ["!"],
NoumanSaleem / gist:7436251
Created Nov 12, 2013
Increase sound quality for Bluetooth devices - OSX
View gist:7436251
# From:
# Increase sound quality for Bluetooth headphones/headsets
defaults write "Apple Bitpool Min (editable)" -int 40
NoumanSaleem / validator.js
Last active Dec 21, 2015
Extend Node Validator to support per-check title + return total number of errors.
View validator.js
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'
You can’t perform that action at this time.