Skip to content

Instantly share code, notes, and snippets.

@codekoala
codekoala / Hubitat RGB Color Picker.user.js
Created September 12, 2018 05:46
Simple userscript to make it easier to set the color for RGB bulbs using Hubitat.
// ==UserScript==
// @name Hubitat RGB Color Picker
// @namespace http://tampermonkey.net/
// @version 0.2
// @description introduce a color picker for RGB bulbs
// @author Josh VanderLinden
// @match http*://*/device/edit/*
// @grant none
// ==/UserScript==
% docker run -it --rm golang:1.4 /bin/bash -c "go version ; time go get -u github.com/trustpath/sequence"
go version go1.4.3 linux/amd64
real 0m7.261s
user 0m2.807s
sys 0m0.367s
% docker run -it --rm golang:1.5 /bin/bash -c "go version ; time go get -u github.com/trustpath/sequence"
go version go1.5.4 linux/amd64
@codekoala
codekoala / remoteip.go
Created November 29, 2016 23:03
Very basic icanhazip.com-like service
package main
import (
"flag"
"fmt"
"log"
"net"
"net/http"
"strings"
)
@codekoala
codekoala / export_chrome_passwords.js
Last active June 24, 2023 11:54
Dump all passwords saved in Google Chrome (tested with Chrome 56.0.2906.0 on Arch Linux)
// Modified version of https://github.com/megmage/chrome-export-passwords
//
// This script allows you to dump all of the passwords stored in your Chrome
// profile. I tested it with Chrome 56.0.2906.0 dev (64-bit) on Arch Linux and
// it worked quite well.
//
// Usage:
//
// - Navigate to chrome://settings-frame/passwords
// - Copy this code into a snippet in Chrome
#!/bin/bash -e
# Setup a Root CA in vault
# Generate and sign an Intermediate cert
#
# Requires:
# * A running vault server already initialzed and unsealed
# * Environment variable VAULT_TOKEN is set
# * vault cli (https://www.vaultproject.io)
# * httpie (https://github.com/jkbrzt/httpie)
@codekoala
codekoala / openpgp.txt
Created March 16, 2016 02:39
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:14cd779519c4ff30dc7b489bc24944e60ae9d665]
@codekoala
codekoala / otc.go
Last active November 26, 2015 07:41
Pull current pricing information for one or more tickers using OTC Markets
// otc is a simple program that gets current pricing data from OTC Markets for
// one or more tickers
package main
import (
"fmt"
"io/ioutil"
"math"
"net/http"
"os"
### Keybase proof
I hereby claim:
* I am codekoala on github.
* I am codekoala (https://keybase.io/codekoala) on keybase.
* I have a public key whose fingerprint is 14CD 7795 19C4 FF30 DC7B 489B C249 44E6 0AE9 D665
To claim this, I am signing this object:
@codekoala
codekoala / ossp.patch
Created January 14, 2015 00:28
Updated patch for uuid
diff -up uuid-1.6.1/uuid-config.in.BAD uuid-1.6.1/uuid-config.in
--- uuid-1.6.1/uuid-config.in.BAD 2008-03-06 11:56:13.000000000 -0500
+++ uuid-1.6.1/uuid-config.in 2008-03-06 11:56:25.000000000 -0500
@@ -121,7 +121,7 @@ do
output_extra="$output_extra $uuid_ldflags"
;;
--libs)
- output="$output -luuid"
+ output="$output -lossp-uuid"
output_extra="$output_extra $uuid_libs"
@codekoala
codekoala / gist:1b614fc8ae104a6b02d8
Last active July 25, 2020 00:51
Windows Firewall for winexe
Windows 2003: netsh firewall add portopening TCP 139 winexe enable subnet
Windows Vista
=============
netsh advfirewall firewall set rule group="Remote Service Management" new enable=yes
Windows 7
=========
netsh advfirewall firewall add rule name=winexe dir=in action=allow protocol=TCP localport=139