Skip to content

Instantly share code, notes, and snippets.

View chriskacerguis's full-sized avatar

Chris Kacerguis chriskacerguis

View GitHub Profile
@chriskacerguis
chriskacerguis / contextMgr.js
Created June 11, 2020 16:41
Context Manager for Justin
function using(res, fn) {
var pRes = Promise.cast(res);
return pRes.then(fn).finally(() => {
return pRes.then((res) => {
return res.close();
});
});
}
@chriskacerguis
chriskacerguis / keybase.md
Created December 16, 2019 20:35
keybase.md

Keybase proof

I hereby claim:

  • I am chriskacerguis on github.
  • I am chriskacerguis (https://keybase.io/chriskacerguis) on keybase.
  • I have a public key ASCKKhzMSYO7LHRKTSAi53ILdWL31AQR_PrHcmU2etmi1wo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am chriskacerguis on github.
  • I am chriskacerguis (https://keybase.io/chriskacerguis) on keybase.
  • I have a public key whose fingerprint is 36CC 336B 1C0B E025 44E9 4642 3AB5 7243 8E41 184E

To claim this, I am signing this object:

@chriskacerguis
chriskacerguis / update_config.sh
Created February 12, 2018 02:24
Auto-deploy script for new Home Assistant config when passes in Travis CU
#!/bin/sh
if [ ! -f /tmp/last_build.txt ]; then
touch /tmp/last_build.txt
fi
current_build=`curl -H "Travis-API-Version: 3" -s https://api.travis-ci.org/repo/14706137/branch/master | jq .last_build.number`
current_build="${current_build%\"}"
current_build="${current_build#\"}"
@chriskacerguis
chriskacerguis / settings.json
Created August 4, 2017 00:34
VScode Settings
{
"git.confirmSync": false,
"editor.tabSize": 2,
"editor.minimap.enabled": false,
"workbench.editor.showIcons": true,
"workbench.iconTheme": "vs-seti",
"workbench.startupEditor": "newUntitledFile"
}
@chriskacerguis
chriskacerguis / install.md
Created July 5, 2017 00:53
Install OZWCP on Ubuntu

First, install some (probably) important libraries:

apt-get update apt-get install libgnutls28-dev libgnutlsxx28

Download, build and install libmicrohttpd

cd wget ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.19.tar.gz tar zxvf libmicrohttpd-0.9.19.tar.gz

@chriskacerguis
chriskacerguis / blacklist.txt
Created March 3, 2017 01:45
Telephone Blacklist of numbers that call my spam phone call trap. Feel free to use.
+18005671757
app.filter('_uriseg', function($location) {
return function(segment) {
// Get URI and remove the domain base url global var
var query = $location.absUrl().replace(BASE_URL,"");
// To obj
var data = query.split("/");
// Return segment *segments are 1,2,3 keys are 0,1,2
if(data[segment-1]) {
return data[segment-1];
}
SELECT l.*,a.*
FROM pg_locks l
JOIN pg_stat_activity a USING (pid)
WHERE NOT granted;