Skip to content

Instantly share code, notes, and snippets.

View sushruth's full-sized avatar
👋

Sushruth Sastry sushruth

👋
View GitHub Profile
@sgpopov
sgpopov / tell-time-every-hour.vbs
Created February 23, 2016 09:19
Windows: announce the time every hour
Dim speaks, speech
speaks = "It's " & hour(time) & " o'clock"
Set speech = CreateObject("sapi.spvoice")
speech.Speak speaks
@PuKoren
PuKoren / recompile-and-run.sh
Last active May 31, 2024 15:18
Recompile APK + Sign with apktool
# You must first install apktool (https://github.com/iBotPeaches/Apktool) and android SDK
# and decompile apk using it
# apktool d -rf my-app.apk
# then generate a key for sign in:
# keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
rm signed-app.apk
apktool b -f -d com.myapp
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore com.myapp/dist/com.myapp.apk alias_name
zipalign -v 4 com.myapp/dist/com.myapp.apk signed-app.apk
@bycoffe
bycoffe / smooth.js
Created September 9, 2011 20:09
Gaussian smoothing function in JavaScript
// Adapted from http://www.swharden.com/blog/2008-11-17-linear-data-smoothing-in-python/
var smooth = function (list, degree) {
var win = degree*2-1;
weight = _.range(0, win).map(function (x) { return 1.0; });
weightGauss = [];
for (i in _.range(0, win)) {
i = i-degree+1;
frac = i/win;
gauss = 1 / Math.exp((4*(frac))*(4*(frac)));
weightGauss.push(gauss);