Skip to content

Instantly share code, notes, and snippets.

@ralex
ralex / seventeentrack.j2
Created December 7, 2020 20:48
17track template for Home Assistant
{% set status = [
{
"sensor": "seventeentrack_packages_not_found",
"icon": "mdi:timer-sand-empty"
},
{
"sensor": "seventeentrack_packages_expired",
"icon": "mdi:restore-alert"
},
{
@ralex
ralex / .inputrc
Created June 5, 2019 08:11
Bash history on partial data input
# Put this in ~/.inputrc
# Then type "ssh" + ↑ or ↓ to get your latest ssh connections
# arrow up
"\e[A":history-search-backward
# arrow down
"\e[B":history-search-forward
@ralex
ralex / haproxy_1_5.cnf
Created January 8, 2018 14:20 — forked from meineerde/haproxy_1_5.cnf
HAPROXY: Redirect all requests to a URL starting with /foo to /bar while retaining everything following it
# In HAProxy 1.5, we have to jump through some hops to accomplish a rewrite of a request's path...
# We use a temporary header to build our new path from the existing one in the request
# and then directly perform a redirect
# Clean the request and remove any existing header named X-Rewrite
http-request del-header X-REWRITE
# Copy the full request URL into X-Rewrite unchanged
http-request add-header X-REWRITE %[url] if { path_beg /foo }

Keybase proof

I hereby claim:

  • I am ralex on github.
  • I am ralex32 (https://keybase.io/ralex32) on keybase.
  • I have a public key ASBhGtYIScWVOejpaQkxW-OzeujMLU0WSy3NeHJWvkVUJgo

To claim this, I am signing this object:

Verifying that "alexandreamor.id" is my Blockstack ID. https://onename.com/alexandreamor
@ralex
ralex / Onename.tmp
Created February 1, 2016 20:55
Onename verification
Verifying that +alexandreamor is my blockchain ID. https://onename.com/alexandreamor