Skip to content

Instantly share code, notes, and snippets.

View shripadk's full-sized avatar
🎯
Working

Shripad Krishna shripadk

🎯
Working
View GitHub Profile
body, html{
margin: 0;
padding: 0;
height: 100%;
border: none;
background-color: #FFF;
}
body, html, table, form, textarea{
font: 12px monospace, sans-serif;
Here are some useful Git commands that I use on a regular basis.
git init
git status
git add .
git commit -a
touch tmp/.gitignore log/.gitignore vendor/.gitignore
git remote add origin (or codaset, github etc)
git@username:codaset.com/nameofproject.git
git push origin master
@shripadk
shripadk / gist:543572
Created August 22, 2010 09:25 — forked from jeffersongirao/gist:542289
Rails 3 with PostgreSQL working (pg gem)
This example shows how to setup an environment running Rails 3 beta 3 under ree-1.8.7-head with a 'rails3' gem set.
# pg gem does not seem to work with 1.9.2-head. Hence, reverting back to ree.
∴ rvm update --head
# ((Open a new shell)) or do 'rvm reload'
# If you do not already have the ruby interpreter installed, install it:
∴ rvm install ree-1.8.7-head
@shripadk
shripadk / gist:552554
Created August 27, 2010 00:59
Setting up Heroku Hostname SSL with GoDaddy SSL Cert
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing).
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here:
* Heroku Hostname SSL
* GoDaddy Standard SSL Certificate
* Zerigo DNS
@shripadk
shripadk / gist:557379
Created August 30, 2010 13:22
Autotest hooks
Autotest.add_hook(:initialize) {|at|
at.add_exception %r{^\.git} # ignore Version Control System
at.add_exception %r{^./tmp} # ignore temp files, lest autotest will run again, and again...
# at.clear_mappings # take out the default (test/test*rb)
at.add_mapping(%r{^lib/.*\.rb$}) {|f, _|
Dir['spec/**/*.rb']
}
nil
}
@shripadk
shripadk / Application.rb
Created September 1, 2010 09:35
Rspec Autotest Spork
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
module SampleApp
class Application < Rails::Application
@shripadk
shripadk / gist:562270
Created September 2, 2010 13:16
Google Closure XPC demo
goog.require('goog.Uri');
goog.require('goog.events');
goog.require('goog.json');
goog.require('goog.net.xpc.CrossPageChannel');
goog.global.initOuter = function(url) {
goog.events.listen(window, 'load', function() { xpcdemo.initOuter(url); });
};
goog.global.initInner = function() {
goog.events.listen(window, 'load', function() { xpcdemo.initInner(); });
From 7cb51a4207a279f3f91dea854b6d70454a5fdb99 Mon Sep 17 00:00:00 2001
From: Joe ST <joe@fbstj.net>
Date: Thu, 26 Aug 2010 21:09:32 +0100
Subject: [PATCH] Adds HTTP basic auth
Signed-off-by: Joe ST <joe@fbstj.net>
---
lib/base64.js | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
lib/cradle.js | 15 +++++++-
2 files changed, 124 insertions(+), 2 deletions(-)
From 7cb51a4207a279f3f91dea854b6d70454a5fdb99 Mon Sep 17 00:00:00 2001
From: Joe ST <joe@fbstj.net>
Date: Thu, 26 Aug 2010 21:09:32 +0100
Subject: [PATCH] Adds HTTP basic auth
Signed-off-by: Joe ST <joe@fbstj.net>
---
lib/base64.js | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
lib/cradle.js | 15 +++++++-
2 files changed, 124 insertions(+), 2 deletions(-)
Undefined symbols:
"_EVP_CIPHER_CTX_block_size", referenced from:
node::Decipher::DecipherUpdate(v8::Arguments const&) in node_crypto_4.o
node::Decipher::DecipherFinal(v8::Arguments const&) in node_crypto_4.o
node::Decipher::DecipherFinalTolerate(v8::Arguments const&) in node_crypto_4.o
node::Cipher::CipherUpdate(v8::Arguments const&) in node_crypto_4.o
node::Cipher::CipherUpdate(v8::Arguments const&) in node_crypto_4.o
node::Cipher::CipherFinal(v8::Arguments const&) in node_crypto_4.o
"_BIO_set_flags", referenced from:
node::base64(unsigned char*, int, char**, int*)in node_crypto_4.o