Skip to content

Instantly share code, notes, and snippets.

View deepakkoirala's full-sized avatar

Deepak Koirala deepakkoirala

View GitHub Profile
@deepakkoirala
deepakkoirala / Procfile
Created January 18, 2020 22:03 — forked from jordansissel/Procfile
Jenkins on Heroku
# Only listen on http; disable ajp and https
web: java -jar jenkins.war --httpPort=$PORT --ajp13Port=-1 --httpsPort=-1
@deepakkoirala
deepakkoirala / upnp.js
Created May 12, 2020 23:37 — forked from acacio/upnp.js
UPNP Port Forwarding for node.js
/* node UPNP port forwarding PoC
This is a simple way to forward ports on NAT routers with UPNP.
This is a not-for-production hack that I found useful when testing apps
on my home network behind ny NAT router.
-satori
usage:
@deepakkoirala
deepakkoirala / observe.py
Created December 28, 2021 17:33 — forked from tchen/observe.py
Observe Bluetooth advertisements for Govee H5075 and H5177 thermo-gygrometer and print out temperature, humidity, battery level
import datetime
from time import sleep
from bleson import get_provider, Observer
def c2f(val):
return round(32 + 9*val/5, 2)
last = {}
def temp_hum(values, battery, address):
@deepakkoirala
deepakkoirala / irEmitterApp
Created July 21, 2022 18:34 — forked from francis2110/irEmitterApp
application for send infrared codes to LG tv with arduino
#include <IRremote.h>
IRsend irsend;
#define onOffReceived 10
#define energyRcv 11
#define avMode 12
#define input 13
#define tvRad 14
#define list 15
#define quickView 16
#define volumeUp 17
@deepakkoirala
deepakkoirala / HMAC.js
Created September 16, 2023 18:08 — forked from stevendesu/HMAC.js
A simple, open-source, HMAC-SHA256 implementation in pure JavaScript. Designed for efficient minification.
// To ensure cross-browser support even without a proper SubtleCrypto
// impelmentation (or without access to the impelmentation, as is the case with
// Chrome loaded over HTTP instead of HTTPS), this library can create SHA-256
// HMAC signatures using nothing but raw JavaScript
/* eslint-disable no-magic-numbers, id-length, no-param-reassign, new-cap */
// By giving internal functions names that we can mangle, future calls to
// them are reduced to a single byte (minor space savings in minified file)
var uint8Array = Uint8Array;
@deepakkoirala
deepakkoirala / nato.json
Created October 13, 2023 04:58 — forked from zekesonxx/nato.json
NATO Phonetic Alphabet in JSON. Just in case someone needs it.
{
"A": "Alfa",
"B": "Bravo",
"C": "Charlie",
"D": "Delta",
"E": "Echo",
"F": "Foxtrot",
"G": "Golf",
"H": "Hotel",
"I": "India",