Skip to content

Instantly share code, notes, and snippets.

View jwalanta's full-sized avatar

Jwalanta Shrestha jwalanta

View GitHub Profile
@jwalanta
jwalanta / OpenWrt detect new device and send text message.md
Last active February 10, 2024 09:16
Detect new network devices connecting to OpenWrt and send text message
@jwalanta
jwalanta / airgradient.ino
Created May 19, 2022 02:20
AirGradient code with Prometheus metrics
/*
Modified version of the AirGradient code at
https://github.com/airgradienthq/arduino/blob/master/examples/C02_PM_SHT_OLED_WIFI/C02_PM_SHT_OLED_WIFI.ino
## Changes from the original code ##
- Instead of sending the metrics to the server, this version starts a web server and exposes Prometheus
compatible metrics at /metrics
@jwalanta
jwalanta / ne
Created May 3, 2019 18:57
Fixed Nepali Romanized keyboard file for Linux (/usr/share/X11/xkb/symbols/ne)
// based on a keyboard map from an 'xkb/symbols/dev' file
//
// $XFree86: xc/programs/xkbcomp/symbols/pc/dev,v 1.2 2002/11/22 04:03:28 dawes Exp $
partial default alphanumeric_keys
xkb_symbols "basic" {
name[Group1]= "Nepali_Romanized";
// `,1,2,3,4,5,6,7,8,9,0,-,=
@jwalanta
jwalanta / ne-trad.mim
Created October 11, 2013 15:14
Fixed ne-trad.mim (Nepali traditional input layout). Replace content of /usr/share/m17n/ne-trad.mim with this.
;; ne-trad.mim -- Nepali input method for traditional layout
;; This files implements the traditional keyboard layout published by MPP.
;; Copyright (c) 2005 Suyash Shrestha <suyash.shr@gmail.com>
;; This file is part of the m17n contrib; a sub-part of the m17n
;; library.
;; The m17n library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
;; as published by the Free Software Foundation; either version 2.1 of
@jwalanta
jwalanta / har2tree.html
Created May 4, 2018 05:22
Convert HAR JSON to Call Tree
<html>
<head>
<title>HAR to Call Tree</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.5/themes/default/style.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.5/jstree.min.js"></script>
<style>
body{
font-family: monospace;
@jwalanta
jwalanta / 4pics1word.php
Created March 18, 2013 07:37
4Pics1Word word finder
<html>
<head><title>4pics1word</title></head>
<body>
<h3>4pics1word</h3>
<form method="GET" action="">
Letters <input type="text" name="w" maxlength="12" /> e.g., "lrckioodubue"<br />
Length <input type="text" name="l" maxlength="1" /> e.g., "7"<br />
<input type="submit" value="Find Words" />
</form>
<?php
@jwalanta
jwalanta / Microsoft Lync Status OSX.scpt
Last active August 29, 2015 14:19
Applescript to get Microsoft Lync Status
--
-- Microsoft Lync Status
-- - Returns current Microsoft Lync status, if running
--
-- @author Jwalanta Shrestha <jwalanta@gmail.com>
--
if application "Microsoft Lync" is running then
tell application "System Events"
tell process "Microsoft Lync"
# loop through all possible windows