Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name SaveFrom.net helper
// @namespace http://savefrom.net/
// @version 2.70
// @date 2014-07-12
// @author Magicbit, Inc
// @description Youtube Downloader: all in one script to get Vimeo, Facebook, Dailymotion videos for free
// @homepage http://savefrom.net/user.php?helper=userjs
// @icon http://savefrom.net/img/extension/icon_16.png
// @icon64 http://savefrom.net/img/extension/icon_64.png
@lekhnath
lekhnath / format-date.js
Created September 10, 2020 09:15 — forked from marlun78/format-date.js
A JavaScript date format inspired by the .NET framework
/**
* Date Format
* Copyright (c) 2011, marlun78
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83
*
* Format options inspired by the .NET framework's format.
* http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
*
* Non-formatting characters within the format string must be
* quoted (single (') or double (") quotes)! The same is true
@lekhnath
lekhnath / pre-receive-puppet
Created September 4, 2019 08:46 — forked from hartfordfive/pre-receive-puppet
Server-side pre-receive hook to validate puppet files.
#!/bin/bash
COMMAND='puppet parser validate'
TEMPDIR=`mktemp -d`
echo "### Attempting to validate puppet files... ####"
# See https://www.kernel.org/pub/software/scm/git/docs/githooks.html#pre-receive
oldrev=$1
newrev=$2
@lekhnath
lekhnath / .babelrc
Created July 18, 2017 09:18 — forked from andrewmunro/.babelrc
Sequelize cli with ES6
{
"presets": ["es2015"],
"plugins": [
"add-module-exports"
],
}
@lekhnath
lekhnath / .eslintrc
Created February 10, 2017 07:29 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@lekhnath
lekhnath / introrx.md
Created April 28, 2016 11:08 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@lekhnath
lekhnath / vagrant-anywhere
Created April 9, 2016 19:05 — forked from chasingmaxwell/vagrant-anywhere
Run the vagrant command for a particular project from 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 / provision.sh
Created February 26, 2016 09:54 — forked from sengertwd/provision.sh
This is my vagrant provision bash script
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 / post-receive
Created September 25, 2015 14:32 — forked from tlrobinson/post-receive
Super simple git post-receive hook for Node.js + nvm + npm + node-foreman + init (Ubuntu) deployment
#!/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 / nginx.conf
Last active September 18, 2015 07:45 — forked from thomasfr/nginx.conf
nginx vhost / site config file
upstream node_backend {
server 127.0.0.1:3000;
keepalive 32;
}
server {
root /var/www/testapp/public;
index index.html;