Skip to content

Instantly share code, notes, and snippets.

@belaz
belaz / Vagrantfile
Created June 21, 2019 21:52 — forked from kikitux/Vagrantfile
Vagrantfile, multi machine with ssh password less and hostname over private network.
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 August 18, 2018 17:17 — forked from eliOcs/apps.js
Express and Handlebars
/*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 June 21, 2019 22:26
Search huge json file ( +16G ) in no time
{
"description": "Search big json file",
"dependencies": {
"node-status": "^1.0.0",
"JSONStream": "^1.3.3"
}
}
@belaz
belaz / git-alias-feature.sh
Last active October 9, 2017 13:03
git alias feature
# 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 October 9, 2017 12:48
git alias fix pull request
# 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\"; \
@belaz
belaz / git-alias-reinit.sh
Created October 9, 2017 12:44
git alias reinit
#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;\