Skip to content

Instantly share code, notes, and snippets.

:octocat:
update your licenses

AbhishekKr abhishekkr

:octocat:
update your licenses
View GitHub Profile
View widen-slack-sidebar-chat
// increase width for side-bar of threads to say 700px
$("#col_flex").css('flex-basis', '700px');
@abhishekkr
abhishekkr / drop-a-bomb.js
Last active Feb 27, 2019
webaudio js samples
View drop-a-bomb.js
{ctx = new AudioContext();
t = {b: ctx.currentTime};
o = ctx.createOscillator();
o.connect(ctx.destination);
o.frequency.value = 500;
o.frequency.exponentialRampToValueAtTime(166,t.b+5);
o.start(t.b);
o.stop(t.b+5);}
@abhishekkr
abhishekkr / node-version
Created Aug 26, 2017
easy version manager for nodejs
View node-version
#!/usr/bin/env bash
set -e
[[ ! -z "$1" ]] && export LOCAL_BIN="$1"
[[ -z "${LOCAL_BIN}" ]] && export LOCAL_BIN="${HOME}/bin"
[[ ! -d "${LOCAL_BIN}" ]] && mkdir -p "${LOCAL_BIN}"
[[ -z "${NODEJSVERSION}" ]] && export NODEJSVERSION="6.11.2"
[[ -z "${NODEJSOS}" ]] && export NODEJSOS="linux"
@abhishekkr
abhishekkr / go-versions
Last active Nov 12, 2019
easy version manager for golang, default at `~/bin` for `v1.13.4`
View go-versions
#!/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 Dec 30, 2017
golang dependency and other tasks manager (stupid and homegrown, does basic job)
View go-tasks
#!/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 Dec 27, 2014
MDBM workspace quick-setup helper
View mdbm.quicksetup.rhel6BaseDistros.sh
#!/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 Aug 29, 2015
simple golang's net example
View tcp_client.go
package main
import (
"fmt"
"io/ioutil"
"net"
"os"
)
const (
View md2html.sh
#!/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
some quick replicated javascript functions for light offline tryouts
View just-delay.js
// 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 Dec 30, 2017
bookmarklet for in-browser editor ~ save them as link of bookmark
View editor-bookmarklet.md
You can’t perform that action at this time.