This file contains 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
" Specify a directory for plugins | |
call plug#begin('~/.vim/plugged') | |
" Any valid git URL is allowed for plugin | |
" Shorthand notation for plugin | |
Plug 'morhetz/gruvbox' | |
" Initialize plugin system | |
call plug#end() |
This file contains 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
// REF: https://medium.com/codeinsights/how-to-load-test-your-node-js-app-using-k6-74d7339bc787 | |
// | |
// brew tap loadimpact/k6 | |
// brew install k6 grafana influxdb | |
// k6 run load_test.js | |
// k6 run --out influxdb=http://localhost:8086/resultsdb load_test.js | |
// | |
// To have launchd start grafana now and restart at login: | |
// brew services start grafana | |
// Or, if you don't want/need a background service you can just run: |
This file contains 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
import logging | |
import logging.handlers | |
LOG_FILE = '/var/log/my_app/server.log' | |
# Set up a specific logger with our desired output level | |
logger = logging.getLogger('my_app') | |
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') | |
logger.setLevel(logging.DEBUG) | |
# Add the log message handler to the logger |
This file contains 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
<object class="profile-pic" data="<%= profile_pic_url %>"> | |
<img class="profile-pic" src="/img/default_profile_pic.png" alt="" height="32"> | |
</object> |
This file contains 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
:: Name: batch_script.cmd | |
:: Purpose: A helper tool. | |
:: | |
:: References: | |
:: http://steve-jansen.github.io/guides/windows-batch-scripting/ | |
:: http://www.vectorsite.net/tsbatch.html | |
:: http://ss64.com/nt/ | |
:: To turn off printing (ECHO’ing) of each batch file line. | |
:: The @ is a special operator to suppress printing of the command line. |
This file contains 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 gulp = require('gulp'); | |
var gulpif = require('gulp-if'); | |
var argv = require('yargs').argv; | |
var autoprefixer = require('gulp-autoprefixer'); | |
var sass = require('gulp-sass'); | |
var csso = require('gulp-csso'); | |
var buffer = require('vinyl-buffer'); | |
var jshint = require('gulp-jshint'); | |
var concat = require('gulp-concat'); | |
var uglify = require('gulp-uglify'); |
This file contains 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
/* | |
* Javascript SocketIO Client v1.4.5 | |
* | |
*/ | |
// Setup SocketIO to connect to server at | |
// given path on given namespace. | |
var socket = io(window.SERVER_URL + '/karma', { | |
query: 'email='+window.email, | |
path: '/api/socket.io' |
This file contains 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
// REF: http://redis.io/topics/distlock | |
var redis = require('redis'); | |
var Redlock = require('redlock'); | |
var lock_client = redis.createClient(port, host, { db: 1 }); | |
var lock_duration = 300000;, // in ms | |
var redlock = new Redlock( |
This file contains 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
REF | |
--- | |
http://stackoverflow.com/questions/23390531/access-denied-403-for-php-files-with-nginx-php-fpm | |
http://stackoverflow.com/questions/21909860/access-denied-on-nginx-and-php | |
https://www.digitalocean.com/community/questions/php-fpm-security-limit_extension-issue |
This file contains 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 | |
# | |
# Currently using 'swagger' to create the api doc. | |
# | |
# REF: https://github.com/fsbahman/apidoc-swagger | |
# REF: https://github.com/swagger-api/swagger-ui | |
# | |
# ################################################ |
NewerOlder