OMG SO AM I
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
<html ng-app="app"> | |
<head> | |
<title>ng dropdown</title> | |
<!-- <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"></link> --> | |
<style> | |
mb-select { | |
display: block; | |
background-color: lime; | |
width: 40px; |
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
// During build, delete everything between start and end tags, keeping things safely scoped | |
// This exists for Grunt, and seems relatively easy to port to Gulp. | |
// https://github.com/philipwalton/grunt-strip-code/ | |
(function hasPrivateFunctions (window) { | |
this.isPublicFunction = isPublicFunction; | |
function isPublicFunction () { | |
return 'I am a public function'; |
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
var str = "users[allUsers['123124'].username].first"; | |
var allUsers = { | |
'123124': {username: 'mbildner'} | |
}; | |
var users = { | |
'mbildner': { | |
first: 'moshe', |
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
LIGHT_GRAY="\[\033[0;37m\]"; BLUE="\[\033[1;36m\]"; RED="\[\033[0;31m\]"; LIGHT_RED="\[\033[1;31m\]"; | |
GREEN="\[\033[0;32m\]"; WHITE="\[\033[1;37m\]"; LIGHT_GRAY="\[\033[0;37m\]"; YELLOW="\[\033[1;33m\]"; | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \(\1\)/'; | |
} | |
function parse_git_status { | |
git status 2> /dev/null | grep 'working directory clean' | wc -l; | |
} | |
function check_git_changes { |
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
var cluster = require('cluster'); | |
if (cluster.isWorker) { | |
console.log('Worker ' + process.pid + ' has started.'); | |
// Send message to master process. | |
process.send({msgFromWorker: 'This is from worker ' + process.pid + '.'}) | |
// Receive messages from the master process. |
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
<html> | |
<head> | |
<title>target</title> | |
<style type="text/css"> | |
div.target { | |
width: 400px; | |
height: 400px; | |
background-color: red; | |
transition: background-color 1s; |
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
<html ng-app="mbildner.timeout"> | |
<head> | |
<title></title> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script> | |
<script> | |
function isFunction (obj) { | |
return typeof obj === 'function'; | |
} |
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
# start python simpleHTTPServer in current directory | |
function pserve { | |
if [[ -z $1 ]]; then | |
PYTHON_SERVER_PORT=8000 | |
else | |
PYTHON_SERVER_PORT=$1 | |
fi | |
python -m SimpleHTTPServer $PYTHON_SERVER_PORT | |
} |
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
/* jshint node: true */ | |
'use strict'; | |
var gulp = require('gulp'); | |
var mainBowerFiles = require('main-bower-files'); | |
var concat = require('gulp-concat'); | |
var merge = require('gulp-merge'); | |
gulp.task('all', function () { |