I hereby claim:
- I am MichaelWhi on github.
- I am michaelwhi (https://keybase.io/michaelwhi) on keybase.
- I have a public key whose fingerprint is 5674 1F7C D507 B90B 4925 35F3 C900 9A4D 098F B5DD
To claim this, I am signing this object:
#!/bin/bash | |
if [ $1 = "1" ]; then | |
curl -XPOST -H "Content-type: application/json" -d '{"method":"passthrough", | |
"params": {"deviceId": "DEVICEID", | |
"requestData": "{\"system\":{\"set_relay_state\":{\"state\":1}}}" } | |
}' 'https://eu-wap.tplinkcloud.com?token=TOKEN' | |
else | |
curl -XPOST -H "Content-type: application/json" -d '{"method":"passthrough", | |
"params": {"deviceId": "DEVICEID", | |
"requestData": "{\"system\":{\"set_relay_state\":{\"state\":0}}}" } |
I hereby claim:
To claim this, I am signing this object:
module Enumerable | |
def sum | |
self.inject(0){|accum, i| accum + i } | |
end | |
def mean | |
self.sum/self.length.to_f | |
end | |
def sample_variance |
if(("standalone" in window.navigator) && window.navigator.standalone){ | |
var noddy, remotes = false; | |
var iosClickFixer = function(event) { | |
noddy = event.target; | |
while(noddy.nodeName !== "A" && noddy.nodeName !== "HTML") { | |
noddy = noddy.parentNode; | |
} | |
if('href' in noddy && noddy.href.indexOf('http') !== -1 && (noddy.href.indexOf(document.location.host) !== -1 && noddy.getAttribute("data-method") !== "post" && noddy.getAttribute("data-method") !== "delete" || remotes)) |
class String | |
def palindrome? | |
self.downcase.gsub(" ", "").reverse == self.downcase.gsub(" ", "") | |
end | |
end |