Skip to content

Instantly share code, notes, and snippets.


Saurabh tkshnwesper

View GitHub Profile
tkshnwesper / byobuCommands
Created Aug 21, 2018 — forked from jshaw/byobuCommands
Byobu Commands
View byobuCommands
Byobu Commands
byobu Screen manager
Level 0 Commands (Quick Start)
<F2> Create a new window
tkshnwesper /
Last active Mar 11, 2018
Raspberry Pi Setup
sudo apt install dnsmasq hostapd -y
sudo echo "denyinterfaces wlan0" | sudo tee -a /etc/dhcpcd.conf
sudo tee /etc/network/interfaces.d/wlan0 << EOM
allow-hotplug wlan0
iface wlan0 inet static
tkshnwesper /
Last active Jan 5, 2018
How to setup Gradle on an Existing Intellij Project (Pathashala)

This tutorial assumes that you have

  1. /src/main as your sources folder
  2. /src/test as your test folder
  3. /src/resources as your resources folder

(Even you if don't, it's alright, read on. You'll just have to modify the gradle file a bit)

Install Gradle

You need to install the latest version locally.

tkshnwesper / build.gradle
Created Jan 5, 2018
Pathashala Gradle Boilerplate (with JUnit5 and Mockito 2.+)
View build.gradle
buildscript {
repositories {
dependencies {
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.1'
apply plugin: 'java'
tkshnwesper /
Created Jun 9, 2017
Python script that outputs the musical notes of the sounds that it captures through its mic
import alsaaudio
import numpy as np
from scipy.signal import fftconvolve, kaiser
from matplotlib.mlab import find
import math
# import serial
# ser = serial.Serial('/dev/ttyACM0', baudrate=9600, timeout=0)
fqsdict = {
View droppy
http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 180;
client_max_body_size 0;
sendfile on;
tcp_nodelay on;
gzip off;
upstream droppy {

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y
tkshnwesper / sql.kt
Created Jan 22, 2017
Creating an SQL keyword that does not exist in Anko
View sql.kt
db?.createTable("tablename", true,
"name" to TEXT,
"base" to TEXT,
"lastRead" to object : SqlType {
override val modifier: String?
get() = null
override val name: String
get() = "DATETIME"
tkshnwesper / op.kt
Created Dec 25, 2016
An example of how to use doAsyncResult in Anko
View op.kt
class PopularActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
listView {
// This task will happen asynchronously in a separate thread (so you can perform network operations)
tkshnwesper / strshuffle.go
Last active Sep 21, 2016
String Shuffle in Go
View strshuffle.go
// StrShuffle shuffles a string that is passed to it
func StrShuffle(str string) string {
n := 25 + rand.Intn(25)
var runes []rune
for _, runeval := range str {
runes = append(runes, runeval)
var shuffle = func() bool {
if rand.Intn(2) == 1 {
return true
You can’t perform that action at this time.