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
| packages: | |
| yum: | |
| git: [] | |
| files: | |
| /opt/elasticbeanstalk/hooks/appdeploy/pre/51install_meteor.sh: | |
| mode: "000755" | |
| user: root | |
| group: root | |
| encoding: plain |
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
| app.factory( 'SafeApply', function() { | |
| return function($scope, fn) { | |
| var phase = $scope.$root.$$phase; | |
| if(phase == '$apply' || phase == '$digest') { | |
| if(fn && (typeof(fn) === 'function')) { | |
| fn(); | |
| } | |
| } else { | |
| $scope.$apply(fn); | |
| } |
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 map = L.map( 'map' ); | |
| L.Map.prototype.panToOffset = function (latlng, offset, options) { | |
| var x = this.latLngToContainerPoint(latlng).x - offset[0] | |
| var y = this.latLngToContainerPoint(latlng).y - offset[1] | |
| var point = this.containerPointToLatLng([x, y]) | |
| return this.setView(point, this._zoom, { pan: options }) | |
| } | |
| function centerMap(){ |
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 express = require('express') | |
| , passport = require('passport') | |
| , FacebookStrategy = require('passport-facebook').Strategy; | |
| var usercache = {}; | |
| var User = function(){} | |
| User.findOrCreate = function( profile, cb ){ | |
| usercache[ profile.id ] = profile; | |
| console.log( usercache ); | |
| return cb( null, profile ); |
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
| /** | |
| * Absolute minimal node.js static | |
| * file server using connect. | |
| * | |
| * Directory structure. | |
| * . | |
| * ├── app.js ( this file ) | |
| * └── public/ ( static assets ) | |
| * | |
| * Install & run server. |
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
| while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; cat index.html; } | nc -l 8080; done |
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/bash | |
| function stdout { | |
| echo -e "\e[32m$@\e[0m"; | |
| } | |
| function stderr { | |
| echo -e "\e[31m$@\e[0m" 1>&2; | |
| } |
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/bash | |
| function stdout { | |
| echo -e "\e[32m$@\e[0m"; | |
| } | |
| function stderr { | |
| echo -e "\e[31m$@\e[0m" 1>&2; | |
| } |
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/bash | |
| echo '--- 1 ---' | |
| ls -1 | cowsay | |
| function pause { | |
| read -p "$*" | |
| } | |
| function multi { |
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 GA = require('googleanalytics'), | |
| Table = require('cli-table'), | |
| util = require('util'); | |
| // API client. | |
| // You may need to enable API access to analytics for your account | |
| // here: https://code.google.com/apis/console | |
| var ga = new GA.GA({ | |
| "user": "myaccount@gmail.com", |