Skip to content

Instantly share code, notes, and snippets.

View voidabhi's full-sized avatar

Abhijeet Mohan voidabhi

View GitHub Profile
@voidabhi
voidabhi / node-sample-commandline.js
Last active February 15, 2016 13:23
Simple command line utility in node
var fs = require('fs');
function parseArg(opt) {
var args = Array.prototype.slice.call(process.argv, 2);
var matches = args.filter(function(arg) {
return arg.indexOf(opt) > -1;
});
if (Array.isArray(matches) && matches.length) {
@voidabhi
voidabhi / slack-snippets.py
Created February 14, 2016 22:58
Slack snippets in python
def post_message(token, channel, text, username):
'''
Sending a message(text) as username to channel
'''
params = {
"token": token,
"channel": channel,
"text": text,
"username": username,
var debug = true;
var log = function(type){ debug && window.console && console[( type in console ? type : 'log' )].apply(console, Array.prototype.slice.call(arguments, ( type in console ? 1 : 0 ))); };
@voidabhi
voidabhi / base.css
Last active August 29, 2015 14:28 — forked from planetoftheweb/base.css
Base CSS document with google fonts, Eric Meyer's reset.css, Ethan Schoonover's solarized palette and some basic responsive code.
@import url(http://fonts.googleapis.com/css?family=Roboto+Slab:700|Exo+2:300,600);
/* Eric Meyer's Reset CSS v2.0 - http://cssreset.com */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0}
/* Solarized Palette - http://ethanschoonover.com/solarized ---------
lightgray : #819090;
gray : #70