// jQuery
$(document).ready(function() {
// code
})
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
# found at: | |
# http://stackoverflow.com/questions/1895059/git-revert-to-a-commit-by-sha-hash | |
# reset the index to the desired tree | |
git reset --hard 56e05fced | |
# move the branch pointer back to the previous HEAD | |
git reset --soft HEAD@{1} | |
git commit -m "Revert to 56e05fced" |
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
$(function() { | |
var url = '/rss'; | |
var $list = $('#recent-posts'); | |
$.ajax({ | |
url: url, | |
type: 'GET', | |
dataType: 'xml', | |
success: function(data) { | |
var $items = $(data).find('item'); | |
$items.each( function() { |
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
username: vagrant | |
password: vagrant | |
sudo apt-get update | |
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev | |
sudo aptitude install mysql-server mysql-client | |
sudo nano /etc/mysql/my.cnf |
For more information about this project, follow this link.
##Auto-deploy with php and github on an Ubuntu Amazon EC2 box
Fork from other gist Build auto-deploy with php and git(hub) on an EC2 AMAZON AMI instance - Covers a basic Ubuntu isntall
When ever it says www-data below, it's the user Apache runs under. So if your apache user is called something else, change it to that.
##Install git
sudo aptitude install git-core
rmagick
:sudo apt-get install imagemagick libmagick9-dev
mysql
,mysql2
:sudo apt-get install libmysqlclient-dev
coffee-script
:sudo apt-get install nodejs && sudo ln -s /usr/bin/nodejs /usr/local/bin/node
thinking-sphinx
:sudo apt-get install sphinxsearch
nokogiri
:sudo apt-get install libxslt-dev libxml2-dev
curb
:sudo apt-get install libcurl4-openssl-dev
sqlite3
:sudo apt-get install libsqlite3-ruby libsqlite3-dev
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
Select all and delete (actually move to buffer) | |
:%d | |
Select all and copy to buffer | |
:%y | |
Use p to paste the buffer. |
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
# Helper function for tweeting via twurl | |
# You must have the twurl Ruby gem installed and configured https://github.com/marcel/twurl | |
# This function goes in your bash profile | |
# Usage: tweet "This is a command line tweet" | |
function tweet { | |
twurl -q -d "status=$1" /1/statuses/update.xml | |
} |