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 | |
# Run using: bash <(curl -s https://raw.github.com/gist/1218967) | |
# | |
# Oracle setup based on Lion fix by jcotter | |
# https://forums.oracle.com/forums/message.jspa?messageID=9777450#9777450 | |
if ! which gcc >/dev/null ; then | |
echo | |
echo "Error: XCode not installed; aborting." | |
exit |
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 | |
# Fullscreen (Lion) | |
bash <(curl -s -L http://gr3g.me/tm-full) | |
# Missing Drawer | |
bash <(curl -s -L http://goo.gl/4RUoP) | |
mkdir -p ~/Library/Application\ Support/TextMate/Bundles | |
cd ~/Library/Application\ Support/TextMate/Bundles |
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
# Git branch based prompt | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1 /' | |
} | |
# ruby version based prompt | |
function parse_ruby_version { | |
eval "rbenv version-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
license: gpl-3.0 |
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
license: mit |
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
license: gpl-3.0 | |
border: no | |
height: 1060 |
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
require 'time' | |
def last_changed_date | |
return @last_changed_date if @last_changed_date | |
timestamp = `svn info --show-item last-changed-date --no-newline` | |
# timestamp = "2017-02-27T13:18:11.822530Z" | |
@last_changed_date = DateTime.strptime(timestamp, '%Y-%m-%dT%H:%M:%S.%L').to_time | |
end | |
puts last_changed_date.inspect |
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
# Append to /etc/rc.local | |
if [ -f /boot/xinitrc ]; then | |
ln -fs /boot/xinitrc /home/pi/.xinitrc; | |
su - pi -c 'startx' & | |
fi |
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
require 'benchmark' | |
require 'yaml' | |
n = 10_000 | |
original = YAML.load <<-YML | |
- column: surname | |
rawtext_name: surname | |
mappings: | |
- field: surname | |
clean: :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
while true; do echo -n "project.bob.example:$((RANDOM % 100))|c" | nc -w 1 -u 127.0.0.1 8125; done |
OlderNewer