############################################################################ | |
# # | |
# ------- Useful Docker Aliases -------- # | |
# # | |
# # Installation : # | |
# copy/paste these lines into your .bashrc or .zshrc file or just # | |
# type the following in your current shell to try it out: # | |
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash | |
# # | |
# # Usage: # |
# Author: Zameer Ansari | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# |
package main | |
// More info on Getwd() | |
// https://golang.org/src/os/getwd.go | |
// | |
import( | |
"os" | |
"fmt" | |
"log" | |
) |
I got tired on creating new files manually for each new post a write so I put together this little command line task with Thor.
It creates a new file in the _posts directory with today’s date, parses the parameters to command as the post’s title and adds that as a slug to the new file. It then writes a default yaml template to the file (as specified in the script).
Running thor jekyll:new New and shiny post
will for example create the file _posts/2012-12-28-new-and-shiny-post.markdown
, populate it with an yaml template and finally open the file in my favorite editor.
Add the following to your Gemfile:
#!/bin/sh | |
# id: check_unattached_EIPs.sh | |
# author: nicolas david - nicolas@openlab.fr | |
# | |
## version history: | |
# ---------------------------------------------------------------------------- | |
# v1.0 nicolas@ Initial Version | |
# | |
# ---------------------------------------------------------------------------- |
const countries = [ | |
{ name:"Åland Islands" ,code:"+358", flag: "🇦🇽" }, | |
{ name:"Albania" ,code:"+355", flag: "🇦🇱" }, | |
{ name:"Algeria" ,code:"+213", flag: "🇩🇿" }, | |
{ name:"American Samoa" ,code:"+1684", flag: "🇦🇸" }, | |
{ name:"Andorra" ,code:"+376", flag: "🇦🇩" }, | |
{ name:"Angola" ,code:"+244", flag: "🇦🇴" }, | |
{ name:"Anguilla" ,code:"+1264", flag: "🇦🇮" }, | |
{ name:"Antigua & Barbuda" ,code:"+1268", flag: "🇦🇬" }, | |
{ name:"Argentina" ,code:"+54", flag: "🇦🇷" }, |
const { createLogger, format, transports } = require('winston') | |
const moment = require('moment') | |
// set default log level. | |
const logLevel = 'info' | |
var logger = createLogger({ | |
level: logLevel, | |
levels: { | |
fatal: 0, |
Google cloud's ssh command lets you pass standard ssh flags. To, for example, forward local port 8088 to port 8088 on a vm instance, all you need to do is:
gcloud compute ssh --ssh-flag="-L 8088:localhost:8088" --zone "us-central1-b" "example_instance_name"
Now browsing to localhost:8088 works as it would with standard ssh.
var app = require(process.cwd() + '/app'); | |
var winston = require('winston'); | |
var _ = require('lodash'); | |
// Set up logger | |
var customColors = { | |
trace: 'white', | |
debug: 'green', | |
info: 'green', | |
warn: 'yellow', |