Skip to content

Instantly share code, notes, and snippets.

🎯
Working

Shripad Krishna shripadk

🎯
Working
View GitHub Profile
@shripadk
shripadk / webpack.js
Created Oct 20, 2014
webpack node api
View webpack.js
var path = require('path');
var webpack = require('webpack');
var WebPackDevServer = require('webpack-dev-server');
var uglify = new webpack.optimize.UglifyJsPlugin();
var config = [
{
entry: ['./src/main.js'],
output: {
View EditArea
body, html{
margin: 0;
padding: 0;
height: 100%;
border: none;
background-color: #FFF;
}
body, html, table, form, textarea{
font: 12px monospace, sans-serif;
View Git Commands (including Alias for all)
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 Aug 22, 2010 — forked from jeffersongirao/gist:542289
Rails 3 with PostgreSQL working (pg gem)
View gist:543572
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
View gist:557379
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 Sep 1, 2010
Rspec Autotest Spork
View Application.rb
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
View cradle
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(-)
View cradle
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(-)
View gist:598122
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
View gist:598131
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for gcc : ok
Checking for library dl : yes
You can’t perform that action at this time.