Skip to content

Instantly share code, notes, and snippets.

🎶

Saurabh tkshnwesper

🎶
Block or report user

Report or block tkshnwesper

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tkshnwesper
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
View gist:346bd582a6a1855342bde6b5e21c9f63
### Keybase proof
I hereby claim:
* I am tkshnwesper on github.
* I am rakutenneko (https://keybase.io/rakutenneko) on keybase.
* I have a public key ASBk3myWBjjAxvKR2EtR-9Ww7X4sS-QSL8BL1am0ADsaxQo
To claim this, I am signing this object:
@tkshnwesper
tkshnwesper / setup.sh
Last active Mar 11, 2018
Raspberry Pi Setup
View setup.sh
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
address 172.24.1.1
netmask 255.255.255.0
network 172.24.1.0
@tkshnwesper
tkshnwesper / README.md
Last active Jan 5, 2018
How to setup Gradle on an Existing Intellij Project (Pathashala)
View README.md

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
tkshnwesper / build.gradle
Created Jan 5, 2018
Pathashala Gradle Boilerplate (with JUnit5 and Mockito 2.+)
View build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.1'
}
}
apply plugin: 'java'
@tkshnwesper
tkshnwesper / com.py
Created Jun 9, 2017
Python script that outputs the musical notes of the sounds that it captures through its mic
View com.py
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 {
View setting-up-babel-nodemon.md

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y
@tkshnwesper
tkshnwesper / sql.kt
Created Jan 22, 2017
Creating an SQL keyword that does not exist in Anko
View sql.kt
db?.createTable("tablename", true,
"id" to INTEGER + PRIMARY_KEY,
"name" to TEXT,
"base" to TEXT,
"lastRead" to object : SqlType {
override val modifier: String?
get() = null
override val name: String
get() = "DATETIME"
}
@tkshnwesper
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?) {
super.onCreate(savedInstanceState)
listView {
id = ViewID.ID_POPULAR_LIST
// This task will happen asynchronously in a separate thread (so you can perform network operations)
You can’t perform that action at this time.