Instantly share code, notes, and snippets.

View node-version
#!/usr/bin/env bash
set -e
[[ ! -z "$1" ]] && export LOCAL_BIN="$1"
[[ -z "${LOCAL_BIN}" ]] && export LOCAL_BIN="${HOME}/bin"
[[ ! -d "${LOCAL_BIN}" ]] && mkdir -p "${LOCAL_BIN}"
[[ -z "${NODEJSVERSION}" ]] && export NODEJSVERSION="6.11.2"
[[ -z "${NODEJSOS}" ]] && export NODEJSOS="linux"
View go-versions
#!/usr/bin/env bash
set -e
[[ ! -z "$1" ]] && export LOCAL_BIN="$1"
[[ -z "${LOCAL_BIN}" ]] && export LOCAL_BIN="${HOME}/bin"
[[ ! -d "${LOCAL_BIN}" ]] && mkdir -p "${LOCAL_BIN}"
[[ -z "${GOVERSION}" ]] && export GOVERSION="1.8.3"
[[ -z "${GOOS}" ]] && export GOOS="linux"
View go-tasks
#!/bin/bash
#############################################################################
#
# You don't need to keep your project in GOPATH go-get dir.
# Keep your project in your normal workspace as projects on other stacks.
# This works like virtualenv, will create a local GOPATH and manage it's own via Linux's symlinks magic.
#
# 'source go-tasks'
# source this file to load all methods
# it turns on the go environment for the path it's run from
View mdbm.quicksetup.rhel6BaseDistros.sh
#!/usr/bin/env bash
set -e
#####
# MDBM workspace quick-setup helper
#####
GARAGE_BASEDIR="/tmp/mdbm-garage"
MDBM_BASEDIRNAME="github-yahoo-mdbm"
MDBM_GITURI="https://github.com/yahoo/mdbm"
View tcp_client.go
package main
import (
"fmt"
"io/ioutil"
"net"
"os"
)
const (
View md2html.sh
#!/usr/bin/env bash
# Download HTML converted from provided Markdown, using GitHub API v3
##
md2html(){
if [[ $# -ne 2 ]]; then
echo "ERROR.\nSYNTAX: Markdown_To_HTML <markdown-filepath> <dest-html-filepath>"
return
fi
unset _markdown_filepath
View just-delay.js
// dumb non-jquery delay for quick offline tryouts
function delay(milliseconds) {
var _start = new Date().getTime();
for (;;) {
var _now = new Date().getTime();
if ((_now - _start) > milliseconds){
break;
}
}
View editor-bookmarklet.md
View get-python-pip-venv.sh
#!/usr/bin/env bash
export LANGUAGE="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="UTF-8"
export LANG="en_US.UTF-8"
##### Var
PIP='pip'
View devstack_neutron_migration.patch
diff --git a/lib/neutron b/lib/neutron
index 465b57c..4a8863f 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -427,6 +427,10 @@ function init_neutron() {
# install_neutron() - Collect source and prepare
function install_neutron() {
git_clone $NEUTRON_REPO $NEUTRON_DIR $NEUTRON_BRANCH
+ _TMP_PWD=$PWD
+ cd $NEUTRON_DIR