Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# recursively walk directory and convert javascript files to typescript files
#
# .style.js -> .style.ts
# .js -> .tsx
#
# Usage `./convert-ts.sh src`
#
<?php
/**
* Template debug
*/
add_filter('template_include', function ($template) {
error_log('Template :: ' . $template);
return $template;
}, 99);

Turn WeMo smart plug on or off

curl -H 'Content-type:text/xml;  charset=utf-8' -H 'SOAPACTION:"urn:Belkin:service:basicevent:1#SetBinaryState"' -d '<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <s:Body><u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"> <BinaryState>1</BinaryState></u:SetBinaryState></s:Body></s:Envelope>' 'http://192.168.0.190:49153/upnp/control/basicevent1'
#!/bin/bash
#
# Install Google's modified scrypt package for Firebase auth on macOS.
# https://github.com/firebase/scrypt
#
# Last tested on macOS Big Sur 11.3.1 (20E241)
#
brew install autoconf automake libtool