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
// Examples: | |
// | |
// HTML: | |
// <form action='messages/1/mark_unread'><input type='submit' class='button_to_link' value='Mark Unread'/></form> | |
// | |
// Rails: | |
// button_to "Mark as unread", mark_as_unread_message_path(message), :method => :put, :class => "button_to_link" | |
// | |
// jQuery: | |
// $(document).ready(function() { |
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
hash = { :water => 'wet', :fire => 'hot' } | |
puts hash[:fire] # Prints: hot | |
hash.each_pair do |key, value| # Or: hash.each do |key, value| | |
puts "#{key} is #{value}" | |
end | |
# Prints: water is wet | |
# fire is hot | |
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
Server: | |
DISTRIB_ID=Ubuntu | |
DISTRIB_RELEASE=6.06 | |
DISTRIB_CODENAME=dapper | |
DISTRIB_DESCRIPTION="Ubuntu 6.06.2 LTS" | |
Ruby: | |
ruby 1.8.4 (2005-12-24) [x86_64-linux] | |
RubyGems: | |
RubyGems 0.9.2 | |
WebServer: |
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
sudo apt-get build-dep git-core |
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
Reading package lists... Done | |
Building dependency tree... Done | |
Package libsvn-perl is not available, | |
but is referred to by another package. | |
This may mean that the package is missing, | |
has been obsoleted, or | |
is only available from another source | |
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | |
E: Package libsvn-perl has no installation candidate |
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
apt-get update | |
apt-get upgrade | |
sudo apt-get install git-core |
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
# login to remote server | |
ssh git@{REMOTE_SERVER} | |
# once logged in | |
mkdir example.git | |
# /home/git/example.git is the actual path of the above mkdir | |
cd example.git | |
# I opted out of git --bare init and just did git init | |
# cause I want the files as well as the differences on the git remote | |
git init |
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
# on the slice | |
mkdir ~/.ssh | |
chmod 700 ~/.ssh | |
vim ~/.ssh/authorized_keys (use vim, nano, vi whichever you prefer) | |
# Paste in your public key (from local ~/.ssh/id_[rd]sa.pub) | |
# grabbing your public key from your local | |
cd ~/.ssh | |
cat id_rsa.pub | |
# Copy the entire output and paste it on ~/.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
# from your local do: | |
mkdir example | |
cd example | |
git init | |
touch README | |
git add README | |
git commit -m 'first commit' | |
git remote add origin git@{REMOTE_SERVER}:/home/git/example.git | |
git push origin master |
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
sudo port install git-core +svn | |
########################################################### | |
# A startup item has been generated that will aid in | |
# starting openssh with launchd. It is disabled | |
# by default. Execute the following command to start it, | |
# and to cause it to launch at startup: | |
# | |
# sudo launchctl load -w /Library/LaunchDaemons/org.macports.OpenSSH.plist | |
########################################################### |
OlderNewer