Skip to content

Instantly share code, notes, and snippets.

Lekhnath Rijal lekhnath

Block or report user

Report or block lekhnath

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 Responsive-Bootstrap-3-Timeline.markdown

Responsive Bootstrap 3 Timeline

Responsive Bootstrap Timeline with JackInTheBox and Animate.css

A Pen by MrPirrera on CodePen.

License.

View slugify.js
function slugify(text)
{
return text && text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, '') // Trim - from end of text
|| text;
}
View pdf2png.js
var exec = require('child_process').exec;
var fs = require('fs');
var util = require('util');
var http = require('http');
var url = require('url');
var PDFDocument = require('pdfkit'); // http://pdfkit.org/
http.createServer(function (req, res) {
@lekhnath
lekhnath / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View angularjs-providers-explained.md
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@lekhnath
lekhnath / nginx.conf
Last active Sep 18, 2015 — forked from thomasfr/nginx.conf
nginx vhost / site config file
View nginx.conf
upstream node_backend {
server 127.0.0.1:3000;
keepalive 32;
}
server {
root /var/www/testapp/public;
index index.html;
@lekhnath
lekhnath / post-receive
Created Sep 25, 2015 — forked from tlrobinson/post-receive
Super simple git post-receive hook for Node.js + nvm + npm + node-foreman + init (Ubuntu) deployment
View post-receive
#!/usr/bin/env bash
set -u
set -e
export GIT_WORK_TREE="/var/www/example.com"
export NODE_VERSION="0.10"
echo "--> Checking out..."
git checkout -f
@lekhnath
lekhnath / provision.sh
Created Feb 26, 2016 — forked from sengertwd/provision.sh
This is my vagrant provision bash script
View provision.sh
echo "This is our provisioning script"
apt-get update
apt-get install -y python-software-properties python g++ make
add-apt-repository ppa:chris-lea/node.js
apt-get update
apt-get install -y nodejs
npm install -g grunt-cli
@lekhnath
lekhnath / vagrant-anywhere
Created Apr 9, 2016 — forked from chasingmaxwell/vagrant-anywhere
Run the vagrant command for a particular project from anywhere
View vagrant-anywhere
#!/bin/sh
# Run the vagrant command for a particular project from anywhere.
#
# To use:
# 1. Put this file in ~/bin/ or some other executable path (also make sure the
# file is executable).
# 2. Insert the path to the directory containing your project's Vagrantfile
# where indicated below.
# 3. Rename this file to match the project you're using it for.
@lekhnath
lekhnath / introrx.md
Created Apr 28, 2016 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md
You can’t perform that action at this time.