Skip to content

Instantly share code, notes, and snippets.

@rwestergren
rwestergren / serverless.yml
Created October 27, 2020 10:49
Serverless Framework ALB Resource
resources:
Resources:
############
# ALB Resources
############
ALBSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: "${self:service}-${self:provider.stage}-alb-sg"
VpcId: ${self:custom.${self:provider.stage}.alb.vpc}
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 August 5, 2018 15:49
addineye.js - v_2_16_0_0 - 2018-05-13
/*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 December 13, 2016 16:34
HTML Email Filter Test
<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 August 20, 2016 20:47
A simple closure for detecting AdBlock without additional HTTP requests
/**
* 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) {

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:

@rwestergren
rwestergren / Main.java
Last active November 1, 2020 10:30
GetAndroidSig
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;