Skip to content

Instantly share code, notes, and snippets.

View abhishekkr's full-sized avatar
:octocat:
update your licenses

AbhishekKr abhishekkr

:octocat:
update your licenses
View GitHub Profile
@abhishekkr
abhishekkr / go-versions
Last active November 12, 2019 14:13
easy version manager for golang, default at `~/bin` for `v1.13.4`
#!/usr/bin/env bash
### usage example:$ go-versions 1.13.4
set -e
export GOVERSION="$1"
[[ ! -z "$2" ]] && export LOCAL_BIN="$2"
[[ -z "${LOCAL_BIN}" ]] && export LOCAL_BIN="${HOME}/bin"
[[ ! -d "${LOCAL_BIN}" ]] && mkdir -p "${LOCAL_BIN}"
@abhishekkr
abhishekkr / go-tasks
Last active December 30, 2017 23:47
golang dependency and other tasks manager (stupid and homegrown, does basic job)
#!/bin/bash
#############################################################################
#
# You don't need to keep your project in GOPATH go-get dir.
# Keep your project in your normal workspace as projects on other stacks.
# This works like virtualenv, will create a local GOPATH and manage it's own via Linux's symlinks magic.
#
# 'source go-tasks'
# source this file to load all methods
# it turns on the go environment for the path it's run from
@abhishekkr
abhishekkr / mdbm.quicksetup.rhel6BaseDistros.sh
Created December 27, 2014 05:09
MDBM workspace quick-setup helper
#!/usr/bin/env bash
set -e
#####
# MDBM workspace quick-setup helper
#####
GARAGE_BASEDIR="/tmp/mdbm-garage"
MDBM_BASEDIRNAME="github-yahoo-mdbm"
MDBM_GITURI="https://github.com/yahoo/mdbm"
@abhishekkr
abhishekkr / tcp_client.go
Last active January 29, 2025 10:12
simple golang's net example
package main
import (
"fmt"
"io/ioutil"
"net"
"os"
)
const (
#!/usr/bin/env bash
# Download HTML converted from provided Markdown, using GitHub API v3
##
md2html(){
if [[ $# -ne 2 ]]; then
echo "ERROR.\nSYNTAX: Markdown_To_HTML <markdown-filepath> <dest-html-filepath>"
return
fi
unset _markdown_filepath
@abhishekkr
abhishekkr / just-delay.js
Created May 30, 2014 15:38
some quick replicated javascript functions for light offline tryouts
// dumb non-jquery delay for quick offline tryouts
function delay(milliseconds) {
var _start = new Date().getTime();
for (;;) {
var _now = new Date().getTime();
if ((_now - _start) > milliseconds){
break;
}
}
@abhishekkr
abhishekkr / editor-bookmarklet.md
Last active June 6, 2021 18:23
bookmarklet for in-browser editor ~ save them as link of bookmark
@abhishekkr
abhishekkr / get-python-pip-venv.sh
Created February 8, 2014 11:22
get-python-pip-venv.sh
#!/usr/bin/env bash
export LANGUAGE="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="UTF-8"
export LANG="en_US.UTF-8"
##### Var
PIP='pip'
@abhishekkr
abhishekkr / devstack_neutron_migration.patch
Last active January 4, 2016 06:18
[openstack] devstack setup with Neutron and Docker virtualization support
diff --git a/lib/neutron b/lib/neutron
index 465b57c..4a8863f 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -427,6 +427,10 @@ function init_neutron() {
# install_neutron() - Collect source and prepare
function install_neutron() {
git_clone $NEUTRON_REPO $NEUTRON_DIR $NEUTRON_BRANCH
+ _TMP_PWD=$PWD
+ cd $NEUTRON_DIR
#!/bin/bash
nspawn-ls(){
echo "List of all nspawn instances..."
echo "Archlinux:"
for itm in `sudo ls "/srv/subarch/"`; do
echo $itm
done
echo "********************"
}