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
import os | |
import json | |
import httplib2 | |
import flask | |
from oauth2client import client | |
from apiclient.discovery import build | |
http_auth = None | |
view_id = '00000000' # Add view id here |
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
class ActiveRecord::Base | |
def as_json(options={}) | |
super(:except => [:created_at, :updated_at]) | |
end | |
end |
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
#!/bin/bash | |
while [ true ]; do | |
git pull origin master | |
bundle install | |
rake db:migrate | |
rake rake:test:prepare | |
rake spec | |
done |
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
############ For Vitual Machines ####### | |
sudo locale-gen en_CA.UTF-8 | |
sudo apt-get install ruby git build-essential | |
############ Run Updates ############ | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
############ Reboot ############ |
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
document.getElementById('youridhere').scrollIntoView(); |
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
IO.foreach("filename.ext") { |line| p line} |