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
require 'open-uri' | |
letters = { 'v' => 'aeiou', | |
'c' => 'bcdfghjklmnpqrstvwxz' } | |
10.times do | |
@word = Array.new | |
"cvvcvc".each_char do |byte| | |
source = letters[byte] |
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 | |
# | |
# PS1 magic | |
# | |
# Mostly copied from YUVAL KOGMAN version, added my own __git_ps1 stuff | |
# Original: http://gist.github.com/621452 | |
# | |
# See video demo of this at http://vimeo.com/15789794 | |
# | |
# To enable save as .bash_prompt in $HOME and add to .bashrc: |
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 | |
# A Shell Script To Convert All .flac Files To .MP3 Format | |
# Note: I found this script somewhere on usenet and I've modified it for my needs | |
METAFLAC=/usr/local/bin/metaflac | |
FLAC=/usr/local/bin/flac | |
#ID3=/usr/bin/id3 | |
LAME=/usr/local/bin/lame | |
FIND=/usr/bin/find | |
t=$(${FIND} . -type f -iname "*.flac") |
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
#! /usr/bin/env python | |
# -*- conding: UTF-8 -*- | |
import sys | |
import os | |
import time | |
def main(): | |
'''yep this is an awesome but tiny test''' |
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 | |
URL_LIST=$* | |
YOUTUBE_DL="/usr/local/bin/youtube-dl" | |
YOUTUBE_DL_OPTS="--title --restrict-filenames --write-thumbnail --extract-audio --audio-format mp3 --audio-quality 0 --continue --no-overwrites" | |
${YOUTUBE_DL} ${YOUTUBE_DL_OPTS} ${URL_LIST} |
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
# NAGIOS LAZY ./CONFIGURE NOTES | |
export VERSION="3.5.1" | |
./configure | |
--prefix=/servers/MONIT/nagios-${VERSION} | |
--cache-file=/servers/MONIT/nagios-${VERSION}/var/nagios.cache | |
--with-lockfile=/servers/MONIT/nagios-${VERSION}/var/nagios.lock | |
--with-checkresults-dir=/servers/MONIT/nagios-${VERSION}/var/checkresults |
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/sh | |
setup_brew () { | |
if ![-f "/usr/local/bin/brew"]; then | |
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" | |
fi | |
} | |
setup_ipython () { | |
brew install gcc |
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
# -*- coding: utf-8 -*- | |
from __future__ import print_function, unicode_literals | |
from pprint import pprint | |
import json | |
st = u"lol" | |
lt = [["foo", 1],["bar", 2]] | |
foo = {"keys": "hosts", |
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
LOADING=false | |
usage() | |
{ | |
cat << EOF | |
usage: $0 [options] dbname | |
OPTIONS: | |
-h Show this help. | |
-l Load instead of export |
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
# -*- coding: utf-8 -*- | |
from __future__ import (print_function, division, absolute_import, unicode_literals) | |
import time, datetime | |
import pprint as pprint | |
# 2014-02-04 13:40:42.394000 | |
dt = datetime.datetime | |
now = dt.today() |
OlderNewer