Skip to content

Instantly share code, notes, and snippets.

Lekhnath Rijal lekhnath

View GitHub Profile
@lekhnath
lekhnath / app.js
Last active Aug 6, 2017
BS to AD converter and vice versa
View app.js
var BS_MONTHS_FULL_NE = ['वैशाख', 'जेठ', 'असार', 'साउन', 'भदौ', 'असोज', 'कात्तिक', 'मंसिर', 'पुष', 'माघ', 'फागुन', 'चैत'];
var BS_DAYS_FULL_NE = ['आईतबार', 'सोमबार', 'मंगलबार', 'बुधबार', 'बिहीबार', 'शुक्रबार', 'शनिबार'];
function convertBs2Ad(e){
e.preventDefault();
var form, bsDate, adDate;
try {
@lekhnath
lekhnath / .eslintrc
Created Feb 10, 2017 — 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).
View .eslintrc
{
// 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 / config.json
Created Jun 15, 2017
Cannot import / require json files in javascript projects with checkJs enabled
View config.json
{
"name": "Lekhnath Rijal"
}
@lekhnath
lekhnath / .babelrc
Created Jul 18, 2017 — forked from andrewmunro/.babelrc
Sequelize cli with ES6
View .babelrc
{
"presets": ["es2015"],
"plugins": [
"add-module-exports"
],
}
View gist:fe3388d7a5880c5c96f9b1b16b5ea8d2
// ==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 / pre-receive-puppet
Created Sep 4, 2019 — forked from hartfordfive/pre-receive-puppet
Server-side pre-receive hook to validate puppet files.
View pre-receive-puppet
#!/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
You can’t perform that action at this time.