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
| #!/usr/bin/env ruby | |
| require 'optparse' | |
| class OptParse | |
| # Return a dictionary describing the options. | |
| # | |
| def self.parse(args) |
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
| #/usr/bin/bash | |
| find ~/Repos -type d -maxdepth 1 \ | |
| -exec bash -c "cd '{}' && if [ -d \$PWD'/.git' ]; then \ | |
| echo 'Updating ' \$PWD; git pull origin master 2>/dev/null; fi" \ | |
| 2>/dev/null \; |
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
| const numeronymize = (name) => | |
| [name[0], (name.slice(1, -1)).length, name[name.length - 1]].join('').toLowerCase() | |
| console.log('Internationalization: ', numeronymize('Internationalization')) | |
| console.log('Localization: ', numeronymize('Localization')) | |
| console.log('Accessibility: ', numeronymize('Accessibility')) | |
| console.log('Modularization: ', numeronymize('Modularization')) | |
| console.log('Programming: ', numeronymize('Programming')) | |
| console.log('Translation: ', numeronymize('Translation')) | |
| console.log('Virtualization: ', numeronymize('Virtualization')) |
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 () { | |
| var root = $(document.getElementsByTagName('body')); | |
| var watchers = []; | |
| var f = function (element) { | |
| if (element.data().hasOwnProperty('$scope')) { | |
| angular.forEach(element.data().$scope.$$watchers, function (watcher) { | |
| watchers.push(watcher); | |
| }); | |
| } | |
| angular.forEach(element.children(), function (childElement) { |
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
| // From http://coolors.co/5a0663-d2dcdd-2f1700-f22d00-83a9b2 | |
| $orange: #F22D00; | |
| $blue: #83A9B2; | |
| $brown: #2F1700; | |
| $purple: #5A0663; | |
| $gray: #D2DCDD; |
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 | |
| # Andrew Erlichson | |
| # 10gen | |
| # script to start a sharded environment on localhost | |
| # clean everything up | |
| echo "killing mongod and mongos" | |
| killall mongod | |
| killall monogs |
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
| * { | |
| font-size: 12pt; | |
| font-family: monospace; | |
| font-weight: normal; | |
| font-style: normal; | |
| text-decoration: none; | |
| color: black; | |
| cursor: default; | |
| } |
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
| [ | |
| { | |
| "id": "AFG", | |
| "alpha": "AF", | |
| "name": "Afghanistan", | |
| "date": "22-02-2007" | |
| }, | |
| { | |
| "id": "ALA", | |
| "alpha": "AX", |
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 BackboneMixin = { | |
| componentDidMount: function () { | |
| // Whenever there may be a change in the Backbone data, trigger a | |
| // reconcile. | |
| this.getBackboneCollections().forEach(function (collection) { | |
| // explicitly bind `null` to `forceUpdate`, as it demands a callback and | |
| // React validates that it's a function. `collection` events passes | |
| // additional arguments that are not functions | |
| collection.on('add remove change', this.forceUpdate.bind(this, null)); | |
| }, this); |
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
| #!/usr/bin/env node | |
| 'use strict'; | |
| let _ = require('lodash'); | |
| const cicles = process.argv[2] || 100, | |
| fizzbuzz = (n) => { | |
| let word = '', | |
| divideBy = _.curry((b, d) => (d !== 0) && (d % b === 0)), | |
| divideBy3 = divideBy(3), |
OlderNewer