Skip to content

Instantly share code, notes, and snippets.

View itsprdp's full-sized avatar

Pradeep Gangadharaiah itsprdp

View GitHub Profile
@itsprdp
itsprdp / blah
Created February 22, 2015 17:16
Sys V-init.d example. Equivalent to upstart
#! /bin/sh
# /etc/init.d/blah
#
# Some things that run always
touch /var/lock/blah
# Carry out specific functions when asked to by the system
case "$1" in
start)
@itsprdp
itsprdp / Dual-y-Axes-grouped-bar-chart-using-d3.markdown
Created February 18, 2015 12:32
Dual y-Axes grouped bar chart using d3
@itsprdp
itsprdp / dual-y-axes-line-chart-d3.html
Created February 18, 2015 07:36
Dual y axes line chart using d3.js
<!DOCTYPE html>
<meta charset="utf-8">
<head>
<style>
path {
fill: none;
}
.axis {
@itsprdp
itsprdp / grouped-bar-d3.html
Created February 18, 2015 07:35
Grouped bar chart with d3
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.axis path,
.axis line {
@itsprdp
itsprdp / dual-y-axes-chart.markdown
Last active August 29, 2015 14:15
Dual Y Axis Chart using highcharts.
@itsprdp
itsprdp / service.conf.erb
Created February 13, 2015 12:19
Delayed Job Upstart Script (Capistrano)
# Ubuntu upstart file at /etc/init/service.conf
pre-start script
mkdir -p /var/log/"#{fetch: application_name}"/
end script
respawn
respawn limit 15 5
start on runlevel [2345]
@itsprdp
itsprdp / d3-line-graph-with-dual-y-axis
Created February 13, 2015 10:22
d3 line graph with dual y axis
<!DOCTYPE html>
<meta charset="utf-8">
<head>
<style>
path {
fill: none;
}
.axis {
@itsprdp
itsprdp / moz-styles.css
Created December 1, 2014 09:11
Mozilla Firefox Specific Styles selector
/*
* Common styles across all browsers
*/
.selector {
/*
* Normal styles
*/
}
@itsprdp
itsprdp / byebug_as_debugger.rb
Last active August 29, 2015 14:10
byebug as debugger monkey patch
module Rails
module Rack
class Debugger
def initialize(app)
@app = app
# clear ARGV so that rails server options aren't passed to IRB
ARGV.clear
require 'byebug'
--- git-rebase--interactive.old 2011-06-11 13:17:48.000000000 +0400
+++ git-rebase--interactive 2012-04-17 12:44:09.000000000 +0400
@@ -951,7 +951,7 @@
REVISIONS=$ONTO...$HEAD
SHORTREVISIONS=$SHORTHEAD
fi
- git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \
+ git rev-list $merges_option --pretty=">%h (%an <%ae>) %s"\
--abbrev=7 --reverse --left-right --topo-order \
$REVISIONS | \