Skip to content

Instantly share code, notes, and snippets.

var Hapi = require('hapi'),
server = Hapi.createServer(parseInt(process.env.PORT || 3000), { files: { relativeTo: __dirname } }),
gulp = require('gulp'),
uglify = require('gulp-uglify'),
jshint = require('gulp-jshint'),
browserify = require('gulp-browserify');
gulp.task('scripts', function () {
gulp.src(['client/app.js'])
@prabirshrestha
prabirshrestha / react-backbone-router.html
Last active August 29, 2015 13:56
react countries search with backbone router
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<div id="app"></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
@prabirshrestha
prabirshrestha / react-router-qs.html
Created February 21, 2014 03:40
react countries backbone router with fake ajax call
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<div id="app"></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
</html>
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<div id="app"></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
@prabirshrestha
prabirshrestha / gulp-tap-example.js
Created February 27, 2014 22:08
get bower main
var gulp = require('gulp'),
tap = require('gulp-tap');
gulp.src('bower_components/*')
.pipe(tap(function (file, t) {
var main = require(file.path + '/' + 'bower.json').main
console.log(file.path + '/' + main);
}));
@prabirshrestha
prabirshrestha / bus.js
Created March 10, 2014 14:23
sample bus wrapper
/*
* usage:
* var Bus = require('../utils/bus');
* var bus = new Bus({ url: 'amqp://guest:guest@localhost:5672' });
* bus.connect(); // or bus.connectWithRetry();
*
* bus.createQueueIfNotExists('queueName', function (err) {
* if (err) return console.log('error creating queue', err);
* console.log('queue created successfully');
* });
var fs = require('fs'),
path = require('path'),
Promise = require('rsvp').Promise,
request = require('request'),
files = [
'https://www.google.com/images/srpr/logo11w.png',
'http://rack.1.mshcdn.com/media/ZgkyMDEzLzA5LzE2L2JjL0Jpbmdsb2dvb3JhLmFkYjJkLnBuZwpwCXRodW1iCTEyMDB4OTYwMD4/996d9598/35b/Bing-logo-orange-RGB.png',
'http://assets.fontsinuse.com/static/use-media-items/15/14246/full-2048x768/52c4c6bc/Yahoo_Logo.png'
# brew install --HEAD https://gist.githubusercontent.com/prabirshrestha/9824933/raw/fleetctl.rb -v
require 'formula'
class Fleetctl < Formula
homepage 'https://github.com/coreos/fleet'
head 'https://github.com/coreos/fleet.git', :tag => 'v0.1.4'
def install
system "./build"

Keybase proof

I hereby claim:

  • I am prabirshrestha on github.
  • I am prabir (https://keybase.io/prabir) on keybase.
  • I have a public key whose fingerprint is F7B4 722B F1F8 DC22 52E2 20F8 2425 0E11 921B 2564

To claim this, I am signing this object: