I hereby claim:
- I am fizerkhan on github.
- I am fizerkhan (https://keybase.io/fizerkhan) on keybase.
- I have a public key whose fingerprint is FC70 6E02 CFA6 C972 4445 A535 D8C5 19A3 CCA5 DA5D
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| (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: