Skip to content

Instantly share code, notes, and snippets.

View notthetup's full-sized avatar
🔊

Chinmay Pendharkar notthetup

🔊
View GitHub Profile
@notthetup
notthetup / HipsterSG.md
Last active December 11, 2015 09:08
List of hipster places to hangout in Singapore.
@notthetup
notthetup / soxleveller.sh
Last active February 16, 2023 18:43
SoX Normalize (Leveller) for speech.
#!/bin/bash
filename=${1%%.*}
extension=${1##*.}
outputname="$filename"_levelled.$extension
sox $1 $outputname highpass 80 lowpass 8000 compand 0.01,1 -80,-80,-55,-20,-20,-15,0,0 0 -40 0.1 norm -0.5
@notthetup
notthetup / gist:4213687
Created December 5, 2012 08:09 — forked from aehlke/gist:992798
zsh hooks to growl completion of long-running commands
# long-running command growler
# hooks for zsh, built on bash version at http://hints.macworld.com/article.php?story=20071009124425468
preexec_functions+='save_preexec_time'
save_preexec_time() {
export PREEXEC_CMD="$(history $HISTCMD | tail -n 1| sed 's/ *[0-9]* *//')"
export PREEXEC_TIME=$(date +'%s')
}
precmd_functions+='growl_about_long_running_commands'
@notthetup
notthetup / runOnImgLoadComplete.js
Last active October 13, 2015 02:28
Javascript to run a given function only when all the images in the page are loaded.
function runOnImgLoadComplete(onImgLoadCompleteCallback){
var allImgs = document.images;
numTotalImages = imgs.length,
numLoadedImages = 0;
[].forEach.call( allImgs, function( img ) {
if (img.complete){
numLoadedImages++;
if (numLoadedImages == numLoadedImages)