Skip to content

Instantly share code, notes, and snippets.

@belaz
belaz / Vagrantfile
Created Jun 21, 2019 — forked from kikitux/Vagrantfile
Vagrantfile, multi machine with ssh password less and hostname over private network.
View Vagrantfile
numnodes=2
baseip="192.168.10"
#global script
$global = <<SCRIPT
#check for private key for vm-vm comm
[ -f /vagrant/id_rsa ] || {
ssh-keygen -t rsa -f /vagrant/id_rsa -q -N ''
}
@belaz
belaz / apps.js
Created Aug 18, 2018 — forked from eliOcs/apps.js
Express and Handlebars
View apps.js
/*jslint node: true */
"use strict";
var express = require("express"),
consolidate = require("consolidate"),
Handlebars = require("handlebars"),
fs = require("fs");
var app = express();
@belaz
belaz / package.json
Last active Jun 21, 2019
Search huge json file ( +16G ) in no time
View package.json
{
"description": "Search big json file",
"dependencies": {
"node-status": "^1.0.0",
"JSONStream": "^1.3.3"
}
}
@belaz
belaz / git-alias-feature.sh
Last active Oct 9, 2017
git alias feature
View git-alias-feature.sh
# git
feature = "!f(){ \
git stash;\
git checkout -b wait; \
git branch -D master; \
git fetch; \
git pull origin master; \
git checkout master;\
git branch -D wait;\
git branch -D develop;\
@belaz
belaz / git-alias-fixpr.sh
Created Oct 9, 2017
git alias fix pull request
View git-alias-fixpr.sh
# git
fixpr = "!f(){ \
git stash;\
git checkout master;\
git pull;\
git branch -D \"$1-fixed\";\
git push --delete origin \"$1-fixed\";\
git branch -D \"$1-pre-fix\";\
git checkout $1;\
git checkout -b \"$1-pre-fix\"; \
View git-alias-reinit.sh
#git
reinit = "!f(){
git checkout -b wait; \
git branch -D master; \
git fetch; \
git checkout master; \
git pull; \
git branch -D wait; \
git branch -D $1;\
git push --delete origin $1;\
You can’t perform that action at this time.