Skip to content

Instantly share code, notes, and snippets.

@wijhuang
wijhuang / redmon.go
Created January 28, 2020 03:39
Redis Monitor Script that only log command
package main
import (
"flag"
"fmt"
"log"
"os"
"strings"
"time"
@wijhuang
wijhuang / onetab.js
Created April 30, 2018 09:06
OneTab Extension to print link
var list = document.getElementsByTagName("a")
var str = ""
for (var i=0; i<list.length; i++) {
str += list[i].innerText + "\n";
str += list[i].href + "\n";
}
console.log(str);
@wijhuang
wijhuang / check.js
Last active April 10, 2018 07:43
Inject jQuery to any webpage
if (typeof(jQuery)=="function") console.log("Success")
@wijhuang
wijhuang / dateadd.sql
Created August 19, 2016 09:32
SQL Server Date Add Function
--Reference
--http://www.w3schools.com/sql/func_dateadd.asp
--http://stackoverflow.com/questions/113045/how-to-return-the-date-part-only-from-a-sql-server-datetime-datatype
--SQL Server DATE ADD Function
--Syntax DATEADD(<datepart>,<value>,<date>)
SELECT DATEADD(DAY,1,'2016-08-19')