Skip to content

Instantly share code, notes, and snippets.

🎯
Working

Shripad Krishna shripadk

🎯
Working
Block or report user

Report or block shripadk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am shripadk on github.
  • I am shripadk (https://keybase.io/shripadk) on keybase.
  • I have a public key ASB3td--QKqD1eTKdae2A2J7UJeW5WrO1KdF901ifacuWwo

To claim this, I am signing this object:

@shripadk
shripadk / MenuServicos.jsx
Created Dec 10, 2015 — forked from LuizMoreira/MenuServicos.jsx
[Rubix] - Menu item - I can't load menu item dynamically.
View MenuServicos.jsx
var ReactIntl = require('react-intl');
var IntlMixin = ReactIntl.IntlMixin;
var FormattedNumber = ReactIntl.FormattedNumber;
var MenuServicos = React.createClass({
mixins: [IntlMixin],
render: function() {
var menu = (
@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 tx rejected
01000000010518d85ccd785c2b8272040e9d8af81525444d039b8970fc02c42475c660e1a400000000d700483045022100cc31a4757fb8c271d904f76a09f49e65699804a4b32879a61cd8cc4cada3078202205e0e1110e6dd066562c190b69c09f6b55dccbb85218e7dbeb87dc04013a81206014c8b5121034ccea3bd0a30e05d9065e4a47683ff86c2b735bc24b5abf682c9421563ea764d21024aa0ff5b42d9e4694b6092183952592f657b71f221120ce522fcdc265038ec6b2102f0a18afb3a68d3329bbee1f154bcf4f29aec0185974ec803ac767a259da764e521020b2af507a116fa025f286004c2704004205a5aff5b4dba99fd08ac24ac300cf254aeffffffff01a0860100000000001976a914d8c446e59afac7863e4698f6d4de9d7a45fbd76988ac00000000
View bitcoin-notification-client.js
var redis = require('redis');
var client = redis.createClient();
var pullNotifications = function() {
// if notification in list rpop it else block until one is available; timeout=0;
client.brpop('_bitcoin_notifications_', '_bitcoin_notifications_', 0, function(e, data) {
if(!data.length) return;
data = JSON.parse(data[1]);
switch(data.type) {
View gist:5691331
# download libpng 1.4.x (1.5 didn't work yet with GraphicsMagick 1.3.12)
./configure --prefix=$HOME/INST && make && make install
# download libjpeg
./configure --prefix=$HOME/INST && make && make install
# download GraphicsMagick
CFLAGS=-I$HOME/INST/include LDFLAGS=-L$HOME/INST/lib ./configure --prefix=$HOME/INST --disable-openmp --disable-openmp-slow && make && make install
@shripadk
shripadk / watch_jade.js
Last active Dec 17, 2015
Script that watches Jade files and compiles all of them to a single javascript file.
View watch_jade.js
#!/usr/bin/env node
/**
* dependencies:
* clientjade (sudo npm install -g clientjade)
* chokidar (sudo npm install chokidar)
* how to run:
* node watch_jade.js
* to render template, just call:
* jade.render(domNode, templateName, data);
*/
@shripadk
shripadk / README.md
Last active Dec 10, 2015 — forked from mbostock/.block
X-Mouseover with Basis line
View README.md

A line chart with mouseover so that you can read the y-value based on the closest x-value. The x-value is found using d3.mouse and scale.invert. The y-value is then found by bisecting the data.

View gist:4056550
var fs = require('fs');
function removeSockFile(file) {
if(fs.existsSync(__dirname+"/tmp/"+file)) {
fs.unlinkSync(__dirname+"/tmp/"+file);
}
}
removeSockFile('app.sock');
removeSockFile('main.sock');
View gist:4056389
var http = require('http');
var cp = require('child_process');
var httpProxy = require('http-proxy');
var sentinelChild = cp.spawn('node', ['app.js'], {stdio: 'inherit'});
var agentChild = cp.spawn('node', ['agent/agent.js'], {stdio: 'inherit'});
var agent = new httpProxy.HttpProxy({
target: {
host: 'localhost',
You can’t perform that action at this time.