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
# copied from http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/ | |
git clone <git repository A url> # clone source repository | |
cd <git repository A directory> | |
git remote rm origin # to make sure it doesn't affect the original repository | |
git filter-branch --subdirectory-filter <directory 1> -- --all # remove all files other than the ones needed | |
mkdir <directory 1> # move them into another directory where they will be stored in the destination repository (if needed) | |
mv * <directory 1> | |
git add . | |
git commit |
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
window.onload = function () | |
{ | |
var canvas = document.getElementById("overlay_canvas"); | |
var ctx = canvas.getContext("2d"); | |
var image = new Image(); | |
image.src = "http://placekitten.com/4536/3024"; | |
image.onload = function () { | |
ctx.drawImage(image, 0, 0); | |
image_ctx = image.getContext("2d"); | |
debugger; |
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
service = angular.element('*[ng-app]').injector().get('serviceName') |
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
client = require 'socket.io-client' | |
socket = null | |
host = "http://localhost:12345" | |
connect_client = () -> | |
console.log('connecting') | |
socket = client.connect(host, {'force new connection': true}) | |
socket.on('connect', ()-> | |
console.log('connected') |
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
# This script installs nodejs, coffeescript and git on an Ubuntu machine. | |
# Configures git to use with Github and clones a repository with a node | |
# project and installs its dependencies. | |
# 30 Jun 2013 | |
# Ibrahim Muhammad | |
# http://ibrahimmuhammad.com | |
# install node prereqs | |
sudo apt-get install python-software-properties python g++ make |
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
# Pre-requisite: X-Code Command Line Tools: http://connect.apple.com | |
# install homebrew | |
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" | |
# git | |
brew install git | |
#rbenv |
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
# encoding: UTF-8 | |
# Add the about comment in the ruby file |
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
.parent | |
{ | |
position: relative; | |
} |
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
sudo aptitude install build-essential libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev | |
sudo apt-get install libxslt-dev libxml2-dev | |
sudo apt-get install libmysqlclient-dev ruby-dev | |
sudo apt-get install libcurl4-openssl-dev | |
sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev | |
sudo apt-get install libsqlite3-dev | |
sudo apt-get install libreadline-dev | |
### Install Java ### | |
sudo apt-get install openjdk-6-jre-headless |
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
class ActiveRecord::Base | |
def as_json(options={}) | |
super(:except => [:created_at, :updated_at]) | |
end | |
end |