Install git-describe grunt plugin
npm install grunt-git-describe --save-dev
One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-git-describe');
(function() { | |
"use strict"; | |
angular | |
.module( appName, [ ] ) | |
.config([ "$provide", function( $provide ) | |
{ | |
// Use the `decorator` solution to substitute or attach behaviors to | |
// original service instance; | |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
syntax on " enable syntax processing | |
set tabstop=4 " number of visual spaces per TAB | |
set softtabstop=4 " number of spaces in tab when editing | |
set expandtab " tabs are spaces | |
set number " show line numbers |
# This is an example of the Stack Exchange Tier 1 HAProxy config | |
# The only things that have been changed from what we are running are: | |
# 1. User names have been removed | |
# 2. All Passwords have been remove | |
# 3. IPs have been changed to use the example/documentation ranges | |
# 4. Rate limit numbers have been changed to randome numbers, don't read into them | |
userlist stats-auth | |
group admin users $admin_user | |
user $admin_user insecure-password $some_password |
/** | |
* the HTML5 autofocus property can be finicky when it comes to dynamically loaded | |
* templates and such with AngularJS. Use this simple directive to | |
* tame this beast once and for all. | |
* | |
* Usage: | |
* <input type="text" autofocus> | |
*/ | |
angular.module('utils.autofocus', []) |
npm install grunt-git-describe --save-dev
One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-git-describe');
function countPieces() { | |
it = b.pieces(); | |
var i = 0; | |
while (it.current()){ i++; it.next() } | |
return i; | |
} | |
function getRandPiece() { | |
var it = b.pieces(); | |
var n = Math.floor(Math.random()*countPieces()); |
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
We are using Supervisor inside the Docker container to start the processes run by the container. Our supervisord.conf looks like the following:
struct { initialized bool; configHandlers []nsq.configHandler; DialTimeout time.Duration "opt:\"dial_timeout\" default:\"1s\""; ReadTimeout time.Duration "opt:\"read_timeout\" min:\"100ms\" max:\"5m\" default:\"60s\""; WriteTimeout time.Duration "opt:\"write_timeout\" min:\"100ms\" max:\"5m\" default:\"1s\""; LocalAddr net.Addr "opt:\"local_addr\""; LookupdPollInterval time.Duration "opt:\"lookupd_poll_interval\" min:\"5s\" max:\"5m\" default:\"60s\""; LookupdPollJitter float64 "opt:\"lookupd_poll_jitter\" min:\"0\" max:\"1\" default:\"0.3\""; MaxRequeueDelay time.Duration "opt:\"max_requeue_delay\" min:\"0\" max:\"60m\" default:\"15m\""; DefaultRequeueDelay time.Duration "opt:\"default_requeue_delay\" min:\"0\" max:\"60m\" default:\"90s\""; BackoffMultiplier time.Duration "opt:\"backoff_multiplier\" min:\"0\" max:\"60m\" default:\"1s\""; MaxAttempts uint16 "opt:\"max_attempts\" min:\"0\" max:\"65535\" default:\"5\""; LowRdyIdleTimeout time.Duration "opt:\"low_rdy_idle_timeout\" min:\"1s\" max:\"5m\" default: |