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
def set_rnd_pass | |
digitpct = 0.4 | |
letterset = ('A'..'Z').to_a - ['I', 'O'] | |
#begin | |
passwd = '' | |
8.times do | |
if rand < digitpct | |
passwd << rand(10).to_s | |
else |
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
- Install Xcode http://developer.apple.com/mac/scripts/downloader.php?path=/Developer_Tools/xcode_3.1.3_developer_tools/xcode313_2736_developerdvd.dmg | |
- Rename mac ruby: | |
sudo bash | |
mv /usr/bin/ruby /usr/bin/ruby.orig | |
mv /usr/bin/gem /usr/bin/gem.orig | |
mv /usr/bin/rails /usr/bin/rails.orig | |
logout | |
- Install Macports: http://www.macports.org/install.php |
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
# Configuration supporting multiple users with any type of | |
# IPsec/L2TP client. This includes the updated Windows 2000/XP | |
# (MS KB Q818043), Vista and Mac OS X 10.3+ but excludes the | |
# non-updated Windows 2000/XP. | |
# | |
# Authenticates through a Pre-Shared Key. Supports clients that | |
# are not behind NAT. Does not support clients that are behind NAT. | |
conn L2TP-PSK | |
# |
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
cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir ~/.ssh 2>/dev/null; chmod 700 ~/.ssh; cat - >> .ssh/authorized_keys; chmod 644 ~/.ssh/authorized_keys" |
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
def conditionally_enable_maintenance_page | |
return true | |
end |
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
cat ~/.ssh/id_dsa.pub | ssh user@hostname "cat - >> ~/.ssh/authorized_keys" |
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 "rubygems" | |
require 'open-uri' | |
require "nokogiri" | |
url = "http://cdn.playwire.com/343/mrsses/397.xml" | |
doc = Nokogiri::HTML(open(url)) | |
doc.xpath('//item/content').each do |d| | |
url_to_get = d.attributes['url'].value |
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
CREATE TABLE hmda | |
(year integer, | |
respondent char(10), | |
agency integer, | |
loan_type integer, | |
property_type integer, | |
loan_purpose integer, | |
occupancy integer, | |
loan_amount integer, | |
preapproval integer, |
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
[alias] | |
c = commit -m | |
ci = commit | |
st = status | |
a = add | |
aa= !git add -u && git add . && git status | |
cob = checkout -b | |
up = !git fetch upstream && git rebase upstream/master | |
ir = !git rebase -i origin/master | |
done = !git fetch && git rebase origin/master && git checkout master && git merge @{-1} && rake && git push |
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
class python { | |
file { "/tmp/rpm": | |
owner => root, | |
group => root, | |
mode => 644, | |
ensure => directory, | |
source => "puppet:///files/rpm/", | |
recurse => true, | |
} |
OlderNewer