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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
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 | |
set -e | |
REGISTRY=registry.gitlab.com | |
REGISTRY_GROUP=${REGISTRY_GROUP:=acme} | |
REGISTRY_USERNAME=${REGISTRY_USERNAME:=${REGISTRY_GROUP}-ci} | |
PROJECT_NAME="${PWD##*/}" | |
IMAGE_TAG=${IMAGE_TAGE:=latest} | |
IMAGE_NAME=${REGISTRY}/${REGISTRY_GROUP}/${PROJECT_NAME}:${IMAGE_TAG} | |
echo "BUILD TARGET: ${REGISTRY_USERNAME}@${IMAGE_NAME}" |
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
// Generic logger with CloudWatch transport | |
const winston = require('winston'); | |
const WinstonCloudWatch = require('winston-cloudwatch'); | |
const AWS_REGION = process.env.npm_config_logger_cloudwatch_log_region; | |
const AWS_KEY_ID = process.env.npm_config_logger_cloudwatch_key_id; | |
const AWS_SECRET = process.env.npm_config_logger_cloudwatch_key_secret; | |
const LOG_GROUP_NAME = process.env.npm_config_logger_cloudwatch_log_group || 'unknown-group'; | |
const LOG_STREAM_NAME = process.env.npm_config_logger_cloudwatch_log_stream || 'unknown-stream'; | |
const LOG_LEVEL = process.env.npm_config_logger_log_level || 'info'; |
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
image: docker:1.11.2-git | |
stages: | |
- build | |
- test | |
- release | |
#- deploy | |
variables: | |
CONTAINER_IMAGE_NAME: myImage | |
CONTAINER_REGISTRY_NAMESPACE: myNamespace |
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 | |
# - You need to set RANCHER_DOMAIN to a domain that reaches this host via port 80 and 443 | |
# - Run this script with sudo/root, | |
# e.g. `source setup-rancher.sh` | |
# - You can then access the Rancher dashboard via https://rancher.example.com | |
# - To add docker hosts to your Rancher environments, | |
# follow the rest of http://docs.rancher.com/rancher/latest/en/quick-start-guide/ | |
# Configure these | |
RANCHER_DOMAIN="rancher.example.com" |
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
for (var i=0; i<5; i++){ | |
setTimeout(() => console.log('function-scoped i:', i), 100); | |
} | |
for (let i=0; i<5; i++){ | |
setTimeout(() => console.log('block-scoped i:', i), 100); | |
} |
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
curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//' |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/*! | |
* Masonry PACKAGED v3.3.0 | |
* Cascading grid layout library | |
* http://masonry.desandro.com | |
* MIT License | |
* by David DeSandro | |
*/ | |
/** | |
* Bridget makes jQuery widgets |