Skip to content

Instantly share code, notes, and snippets.

Randy Westergren rwestergren

Block or report user

Report or block rwestergren

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rw.rules
import org.openhab.model.script.actions.Timer
var Timer timer = null
var boolean washerStarted = false
var float washerPowerThreshold = 3.0
var int washerFinishedTimeout = 60
rule "Send notification when washer is finished"
when
Item HS110_Power changed
@rwestergren
rwestergren / addineye.js
Created Aug 5, 2018
addineye.js - v_2_16_0_0 - 2018-05-13
View addineye.js
/*addineye.js - v_2_16_0_0 - 2018-05-13*/
var certifiedDomains = ["secure-ds.serving-sys.com", "ds.serving-sys.com", "rm.sina.com.cn", "a248.e.akamai.net", "adimg.163.com", "ad.tom.com", "richads.sina.com.hk", "cdn.fastclick.net", "bigpond.com", "images.sohu.com", "ads-eb.kbb.com", "images.163.com", "eb.tremormedia.com", "eyeblaster.myspacecdn.com", "cn.yimg.com", "img.as.sanook.com", "msn.serving-sys.com", "secure-msntest.serving-sys.com", "ds-cc.serving-sys.com", "detik.serving-sys.com", "cdn.mm.atwola.com", "mediamind.da.vcdn.vn", "ds-vn.serving-sys.com"];
if (!("JSON" in window && window.JSON)) {
JSON = {}
}(function() {
function f(n) {
return n < 10 ? "0" + n : n
}
if (typeof Date.prototype.toJSON !== "function") {
Date.prototype.toJSON = function(key) {
@rwestergren
rwestergren / html_test.html
Created Dec 13, 2016
HTML Email Filter Test
View html_test.html
<a onafterprint="console.log(244599)" onbeforeprint="console.log(309354)" onbeforeunload="console.log(879813)" onerror="console.log(949564)" onhashchange="console.log(575242)" onload="console.log(301053)" onmessage="console.log(976974)" onoffline="console.log(796090)" ononline="console.log(432638)" onpagehide="console.log(504345)" onpageshow="console.log(696619)" onpopstate="console.log(398418)" onresize="console.log(943097)" onstorage="console.log(882233)" onunload="console.log(929443)" onblur="console.log(932104)" onchange="console.log(102339)" oncontextmenu="console.log(761265)" onfocus="console.log(188946)" oninput="console.log(143653)" oninvalid="console.log(304208)" onreset="console.log(318472)" onsearch="console.log(778420)" onselect="console.log(942035)" onsubmit="console.log(603589)" onkeydown="console.log(650647)" onkeypress="console.log(579383)" onkeyup="console.log(821763)" onclick="console.log(284098)" ondblclick="console.log(477370)" ondrag="console.log(439095)" ondragend="console.log(546684)" o
@rwestergren
rwestergren / adBlockDetect.js
Created Aug 20, 2016
A simple closure for detecting AdBlock without additional HTTP requests
View adBlockDetect.js
/**
* A simple closure for detecting AdBlock without additional HTTP requests
*
* Heavily inspiried by Christian Heilmann's work here: https://www.christianheilmann.com/2015/12/25/detecting-adblock-without-an-extra-http-overhead/
*/
window.adBlockDetect = (function() {
var enabled;
var callback = function(args) {
View keybase.md

Keybase proof

I hereby claim:

  • I am rwestergren on github.
  • I am rwestergren (https://keybase.io/rwestergren) on keybase.
  • I have a public key whose fingerprint is A1DC 32A1 8D16 73EC 9878 1A2E 9169 FEB4 34BF AB92

To claim this, I am signing this object:

View Main.java
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.WeakReference;
import java.security.cert.CertificateEncodingException;
import java.util.Enumeration;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.logging.Level;
import java.util.logging.Logger;
You can’t perform that action at this time.