Skip to content

Instantly share code, notes, and snippets.

Avatar

vrdhn vrdhn

View GitHub Profile
@vrdhn
vrdhn / launcher
Created Dec 18, 2014
a dmenu+xdotool launcher which can paste to terminal and show often used commands at top
View launcher
#!/usr/bin/python3
# launcher (C) vrdhn0@gmail.com
# A dmenu & xdotool based launcher
# Features
# * Select from previously entered commands, or enter new one
# * Listing sorted by usage frequency
# * pasted to application using xdotool
# * terminate by '&' to launch as X application
# * manipulate ~/.config/launcher.db to add/remove/bump usage count
View dpy.sh
#!/usr/bin/env bash
## Display .. LT and DT
lt=eDP1
dt=HDMI1
View gist:c256bb736b777d235d37
files,err := filepath.Glob( woextn + "/*.lbk")
if err != nil {
for e := range files {
//// cannot use e (type int) as type string in argument to makeNode
got := makeNode(&n,e)
View docker-entry-point.sh
## Login into the docker with proper ID/GID
## just pass -e ID="$(id)" .. and script takes care of rest
## Useful with mounting local filesystem
if [ "x$ID" = "x" ] ; then
echo "ID not passed, you get root shell"
exit 0
@vrdhn
vrdhn / eip.sh
Created Feb 26, 2017
elm package install, by cloning specific branch from a shared locally cloned git repo
View eip.sh
#!/bin/sh
## elm-get owner/repo ver
repo=$1
ver=$2
giturl=git@github.com:$repo
View gist:aae4cc8a6efa8817ade8bac2f8dd3fb0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun fix ()
(interactive)
View update to a version of gradle
## Simple bash function to upgrade to a version to gradle
##
gg()
{
ver=${1:-4.1.0}
dver=${2:-4.1}
echo Gradle Version $ver / $dver
gu=https://raw.githubusercontent.com/gradle/gradle/v$ver/gradlew
gw=https://raw.githubusercontent.com/gradle/gradle/v$ver/gradlew.bat
gj=https://raw.githubusercontent.com/gradle/gradle/v$ver/gradle/wrapper/gradle-wrapper.jar
View linux_clocks.c
/**
** Print time taken by various clocks
--- resolutions ---
CLOCK_BOOTTIME : 0.000000001
CLOCK_MONOTONIC : 0.000000001
CLOCK_MONOTONIC_COARSE : 0.003333333
CLOCK_MONOTONIC_RAW : 0.000000001
View .bashrc
## Minimalism.
export PATH=/usr/bin
## I am in India So...
export TZ=Asia/Kolkata
export LANG=en_IN.UTF-8
alias v='vim ~/env.sh ; . ~/env.sh'
View gist:7f0829868346fd82cf16734897c92f5f
https://www.icicibank.com/corporate/globaltradeservice/wiretransfer-localbank-usd.page
You can’t perform that action at this time.