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
[alias] | |
# See http://cat.pdx.edu/~hunner/git-lg.png for an example | |
lg = "log --decorate --pretty=format:'%C(yellow)%h%C(reset) %C(green)%G?%C(reset) %C(blue)%an%C(reset) %C(cyan)%cr%C(reset) %s %C(auto)%d%C(reset)' --graph --date-order" |
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
filetype indent on | |
set expandtab | |
set tabstop=4 | |
set shiftwidth=4 | |
set autoindent | |
set smartindent |
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 python | |
""" | |
Last.fm scrobbling for Pianobar, the command-line Pandora client. Requires Pianobar, Python, pyLast and Last.fm API credentials. | |
https://github.com/PromyLOPh/pianobar/ | |
http://code.google.com/p/pylast/ | |
http://www.last.fm/api/account | |
Installation: | |
1) Copy this script and pylast.py to the Pianobar config directory, ~/.config/pianobar/, and make sure this script is executable |
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 ruby | |
## | |
## Procedural languages: | |
## | |
a = [] | |
w=File.readlines('/usr/share/dict/words') | |
r=(0..10);c=r.map{Hash.new(0)};r.each{|i| |
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
# Install git via macports or homebrew... | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> .zshrc | |
source .zshrc | |
rvm notes # This will tell you about the following commands | |
rvm install 1.8.7 | |
rvm system | |
rvm gemset export system.gems | |
rvm 1.8.7 |
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>/lib/puppet/parser/functions/keys.rb | |
Puppet::Parser::Functions::newfunction(:keys, :type => :rvalue) do |args| | |
args.collect { |h| h.keys if h.is_a?(Hash) }.flatten.compact | |
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
### output | |
err: /Stage[main]/Keymanager/File[keymanager_dbyml]/ensure: change from absent to file failed: Could not set 'file on ensure: No such file or directory - /mnt/apigee/keymanager/current/config/database.yml.puppettmp_5679 at /etc/puppet/modules/keymanager/manifests/init.pp:60 | |
notice: /Stage[main]/Keymanager/File[keymanager_current]/ensure: created | |
### manifest | |
file { | |
"keymanager_current": | |
path => "${apigeemnt}/keymanager/current", | |
ensure => link, | |
owner => apache, |
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
notice: /Stage[main]/Analytics::Reportingserver/File[/mnt/apigee/analytics/database/postgresql.conf]/mode: mode changed '600' to '644' | |
info: /Stage[main]/Analytics::Reportingserver/File[/mnt/apigee/analytics/database/postgresql.conf]: Scheduling refresh of Service[postgresql] | |
info: /Stage[main]/Analytics::Reportingserver/File[/mnt/apigee/analytics/database/postgresql.conf]: Scheduling refresh of Service[postgresql] | |
notice: /Stage[main]/Postgresql/Service[postgresql]/ensure: ensure changed 'stopped' to 'running' | |
err: /Stage[main]/Postgresql/Service[postgresql]: Failed to call refresh: Could not restart Service[postgresql]: Execution of '/sbin/service postgresql restart' returned 1: at /etc/puppet/modules/postgresql/manifests/init.pp:47 |
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
do shell script ("hdiutil attach -mountpoint ~/Documents/work ~/Documents/Work.sparsebundle") | |
tell application "Finder" | |
activate | |
make new Finder window | |
select Finder window 1 | |
set target of Finder window 1 to disk "work" | |
end tell |
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
diff --git a/lib/facter/ec2.rb b/lib/facter/ec2.rb | |
index c52f76b..ebfdcff 100644 | |
--- a/lib/facter/ec2.rb | |
+++ b/lib/facter/ec2.rb | |
@@ -23,9 +23,8 @@ def metadata(id = "") | |
if key[-1..-1] != '/' | |
value = open("http://169.254.169.254/2008-02-01/meta-data/#{key}").read. | |
split("\n") | |
- value = value.size>1 ? value : value.first | |
symbol = "ec2_#{key.gsub(/\-|\//, '_')}".to_sym |
OlderNewer