Skip to content

Instantly share code, notes, and snippets.

View jettero's full-sized avatar
🕸️
Hliðskjálf

Paul Miller jettero

🕸️
Hliðskjálf
View GitHub Profile
@jettero
jettero / go.pl
Last active April 26, 2017 16:20
I taught this to go to window items, not just windows --- original: https://scripts.irssi.org/scripts/go.pl
use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
use Irssi::Irc;
# Usage:
# /script load go.pl
# If you are in #irssi you can type /go #irssi or /go irssi or even /go ir ...
# also try /go ir<tab> and /go <tab> (that's two spaces)
#
__virtualname__ = 'profile'
tabulate = None
# tabulate is this:
# https://github.com/gregbanks/python-tabulate/blob/master/tabulate.py
# I usually just copy it into my _modules and/or _output directories along side
# items like this
def __virtual__():
@jettero
jettero / encode-pass.py
Created October 31, 2016 12:58
teamspeak password encoder
#!/usr/bin/env python3
# coding: UTF-8
# I found that I could select the server admin password in the sqlite3 database
# and I could update/change it, but just what is that annoying encoding? It's mime...
# decodes to 20 bytes...
#
# Ahh, it's base64(sha1()) unsalted
import hashlib
import base64
@jettero
jettero / reset-usb-hub
Last active September 30, 2020 22:09
Every now and again my xhci_hcd goes wonky and I can't get USB devices to pop up on it. I hate rebooting for usb problems, so I came up with this.
#!/usr/bin/env bash
# old http://billauer.co.il/blog/2013/02/usb-reset-ehci-uhci-linux/
# old http://enc.com.au/2014/02/14/resetting-usb-devices/
#
# http://www.linux.org/threads/resetting-the-usb-subsystem.6256/
# (page was dead, used google cache)
#
# XXX This definitely worked (2016-08-21), the trouble is finding the serial
# number and the bind/unbind kernel interfaces
@jettero
jettero / jira-issue-details-suck.user.js
Last active March 26, 2017 17:25
Jira Issue Details Suck
// ==UserScript==
// @name Jira Issue Details Suck
// @description Disable the annoying and useless issue details panel on kanbans (and probably elsewhere). Let the issue links work as links.
// @namespace org.voltar.jira-issue-details-suck
// @downloadURL https://gist.github.com/jettero/91840b8257066565ee252e90f3cfe1fb/raw/jira-issue-details-suck.user.js
// @include http*://*atlassian.net/secure/RapidBoard.jspa*
// @include http*://jira*/secure/RapidBoard.jspa*
// @include http*://*/jira/secure/RapidBoard.jspa*
// @version 4.1.4
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js
--- /usr/lib/python2.6/site-packages/salt/pillar/git_pillar.py 2016-02-16 20:52:19.000000000 -0800
+++ git_pillar.py 2016-03-19 10:14:52.732381344 -0700
@@ -254,7 +254,13 @@
opts['pillar_roots'] = {}
pillar = salt.utils.gitfs.GitPillar(opts)
pillar.init_remotes(repo, PER_REMOTE_OVERRIDES)
- pillar.checkout()
+ k = repo[0].keys()[0].replace(' ', '-').replace('/','-')
+ lf = "/var/cache/salt/master/pauls-workaround-%s.lock" % k
+ from lockfile import FileLock
#!/usr/bin/perl
use common::sense;
use Text::CSV;
use Data::Dump qw(dump);
our $csv = Text::CSV->new({binary=>1}) or die "cannot use CSV: " . Text::CSV->error_diag;
$csv->eol("\n");
open my $ufh, "user-list.csv" or die "error opening udata.csv: $!";
@jettero
jettero / .gitignore
Last active August 29, 2015 14:26
wanted to check out D Language for a few years now — just build LDC 0.15.2 beta2
*.o
*.elf
hello
@jettero
jettero / c-blocks-test.pl
Last active August 29, 2015 14:26
just playing with c-blocks
#!/usr/bin/perl
use common::sense;
use C::Blocks;
use C::Blocks::PerlAPI;
cblock {
printf("hello world\n");
}
#!/bin/bash
#
# AUTHOR: Paul Miller <[email protected]>
# RE: This relates to a quest: https://github.com/Nuand/bladeRF/issues/386
# PREREQ:
# http://gnuradio.org/redmine/projects/gnuradio/wiki/GRAndDeps
# http://gnuradio.org/redmine/projects/gnuradio/wiki/GRAndBuild
#
ARGS=()