Skip to content

Instantly share code, notes, and snippets.

@tkshnwesper
tkshnwesper / com.py
Created June 9, 2017 12:54
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 = {
@tkshnwesper
tkshnwesper / README.md
Last active January 5, 2018 18:15
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
tkshnwesper / build.gradle
Created January 5, 2018 17:33
Pathashala Gradle Boilerplate (with JUnit5 and Mockito 2.+)
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.1'
}
}
apply plugin: 'java'
@tkshnwesper
tkshnwesper / setup.sh
Last active March 11, 2018 15:53
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
address 172.24.1.1
netmask 255.255.255.0
network 172.24.1.0
@tkshnwesper
tkshnwesper / byobuCommands
Created August 21, 2018 16:06 — forked from jshaw/byobuCommands
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@tkshnwesper
tkshnwesper / auto_restart.sh
Last active January 9, 2022 07:58
Script to automatically restart a system if there's a problem in connecting to the internet
#!/bin/bash
HOSTNAME=1.1.1.1
TIMEOUT=150
TEST_INTERVAL=60
ping_host() {
ping -c1 "$HOSTNAME" &> /dev/null
}