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 getopt | |
import pycassa | |
import subprocess | |
import sys | |
from pycassa.pool import ConnectionPool | |
from pycassa.columnfamily import ColumnFamily | |
def query_typename(column, typename): | |
data = column.get(typename.replace('-', '_')) |
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 | |
# wget https://gist.githubusercontent.com/epcim/b44b548cadc566fcabc9f6195a19b1dc/raw/byobu-salt.sh -O byobu-salt.sh; chmod +x *.sh | |
# set -x | |
# TODO | |
# on remote host source ~/.${SHELL}rc | |
# auto set -o vi | |
test -n SSH_AGENT || { |
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
#!/usr/bin/env bash | |
function contains { | |
local e match="$1" | |
shift | |
for e; do [[ "$e" == "$match" ]] && return 0; done | |
return 1 | |
} | |
function remove_toplevel { |
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
snippet rnccf | |
import React, { PropTypes } from 'react' | |
import { View, StyleSheet, Text } from 'react-native' | |
$1.propTypes = { | |
} | |
export default function ${1:FunctionName} (props) { | |
return ( |
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
--- | |
systemd: | |
units: | |
- name: etcd2.service | |
enable: true | |
dropins: | |
- name: 40-etcd-cluster.conf | |
contents: | | |
[Service] | |
Environment="ETCD_NAME={{.etcd_name}}" |
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 sys | |
# Constants | |
OPERATORS = ['*', '/', '+', '-'] | |
DECIMAL_SYMBOLS = [',', '.'] | |
SIGN_SYMBOLS = ['-', '+'] | |
PARENTHESIS_OPEN = '(' | |
PARENTHESIS_CLOSE = ')' | |
PRECEDENCE = [[PARENTHESIS_OPEN], ['*', '/'], ['+', '-']] |
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
version: '3.2' | |
services: | |
bastion: | |
image: christophermaier/test-probe:0.1.0-20180509175222 | |
command: | |
- "run" | |
- "--listen-ctl=0.0.0.0:9632" | |
- "--permanent-peer" | |
hostname: bastion | |
domainname: habitat.dev |
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
version: '3.2' | |
services: | |
bastion: | |
image: christophermaier/test-probe:0.1.0-20180509175222 | |
command: | |
- "run" | |
- "--listen-ctl=0.0.0.0:9632" | |
- "--permanent-peer" | |
hostname: bastion | |
domainname: habitat.dev |
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
knife node configure my_node.example.com |
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
# bash history | |
# echo 'shopt -s histappend' >> ~/.bashrc | |
# echo 'PROMPT_COMMAND="history -a;$PROMPT_COMMAND"' >> ~/.bashrc | |
# echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc | |
shopt -s histappend | |
PROMPT_COMMAND="history -a;$PROMPT_COMMAND" | |
export HISTTIMEFORMAT= | |
# paths | |
export PATH=$PATH:~/bin |