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
module Bundler | |
class Dsl | |
def gem(name, *args) | |
['Vendetta', 'Fight for NY', 'Icon'].sample | |
end | |
end | |
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
# | |
# shell function to print graphite graphs as sparklines in the terminal | |
# needs https://github.com/holman/spark | |
# | |
function graphline() { | |
GRAPHITEHOST="graphite.example.com" | |
if [ ! -n "$1" ]; then print "Usage: $0 metric [minutes]"; return 1; fi | |
if [ ! -n "$2" ]; then MINUTES=10 ; else MINUTES=$2; fi | |
curl -s "${GRAPHITEHOST}/render?from=-${MINUTES}minutes&target=${1}&format=raw" | cut -d"|" -f 2 | spark ; | |
} |
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
cassie:sensu:% curl -X GET unwiredcouch-sensu-api.herokuapp.com/info <deploy-heroku ✗> | |
{"sensu":{"version":"0.9.5.beta.2"},"health":{"redis":"ok","rabbitmq":"ok"}} |
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
redis_version:2.4.6 | |
redis_git_sha1:e1849b64 | |
redis_git_dirty:0 | |
arch_bits:64 | |
multiplexing_api:epoll | |
gcc_version:4.4.3 | |
process_id:31827 | |
uptime_in_seconds:2887182 | |
uptime_in_days:33 | |
lru_clock:914202 |
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
588 git | |
328 ls | |
249 cd | |
146 make | |
112 vim | |
100 cat | |
73 echo | |
64 chef-client | |
61 knife | |
57 gcc |
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
0020 SPACE | |
0021 ! EXCLAMATION MARK | |
0022 " QUOTATION MARK | |
0023 # NUMBER SIGN | |
0024 $ DOLLAR SIGN | |
0025 % PERCENT SIGN | |
0026 & AMPERSAND | |
0027 ' APOSTROPHE | |
0028 ( LEFT PARENTHESIS | |
0029 ) RIGHT PARENTHESIS |
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
{{party}} gets bad results in election. | |
{{leader}}, leader of {{party}}, steps down. | |
{{party}} elects {{new_leader}} as new leader. | |
{{new_leader}} promises that he will reinvent the party and earns back | |
the trust of the voters. | |
{{coalition_partner}} hopes they succeed fast with their endeavor. | |
{{member_of_opposition}} is sure that this will never work and that {{party}} | |
has chosen the wrong direction. | |
Nothing changes. |
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
def tsplit(string, delimiters): | |
"""Behaves str.split but supports multiple delimiters.""" | |
delimiters = tuple(delimiters) | |
stack = [""] # stack to return | |
for i in xrange(len(string)): | |
if string[i] in delimiters: | |
stack.append("") | |
else: |
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/sh | |
# | |
# shell script to dump a database from PostgreSQL and | |
# store it in git | |
# | |
AUTHOR="User <user@host>" | |
GITCMD="/usr/local/bin/git" | |
DUMPCMD="/usr/local/bin/pg_dump" | |
BACKUP_REPO="/path/to/repo" |
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/local/bin/zsh | |
# variables | |
gitcmd="/usr/local/bin/git" | |
REPOS="/home/redmine/repos/" | |
repos=(`ls -1 ${REPOS}`) | |
for r in ${repos[@]} | |
do | |
cd ${REPOS}${r} && $gitcmd fetch |