Skip to content

Instantly share code, notes, and snippets.

View denisinla's full-sized avatar
👋

denisinla

👋
View GitHub Profile
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 24, 2024 12:19
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@mgibowski
mgibowski / git-revert-sha-commit
Created August 1, 2012 08:46
[git] revert to a commit by sha hash
# 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"
@alicial
alicial / recent-tumblr-posts.js
Created August 5, 2012 17:03
How to Display Recent Posts in Tumblr
$(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() {
@johnantoni
johnantoni / mysql.txt
Created August 7, 2012 18:57
mysql + vagrant + remote access
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
@rnmp
rnmp / ABOUT.md
Created September 23, 2012 02:06
DATA-COLUMNS

For more information about this project, follow this link.

@AndreasStokholm
AndreasStokholm / README.md
Created September 24, 2012 21:00 — forked from aronwoost/README.md
Auto-deploy with php and github on an Ubuntu Amazon EC2 box

##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
@remi
remi / rubygems-on-ubuntu.md
Created October 17, 2012 21:25
Ruby gems and Ubuntu
  • 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
@Steven-Rose
Steven-Rose / gist:3943830
Created October 24, 2012 04:27
VI: Select all + delete, select all + copy
Select all and delete (actually move to buffer)
:%d
Select all and copy to buffer
:%y
Use p to paste the buffer.
@jtallant
jtallant / tweet.sh
Created October 27, 2012 20:25
Helper Function for tweeting with twurl
# 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
}