Skip to content

Instantly share code, notes, and snippets.

View qrkourier's full-sized avatar

Kenneth Bingham qrkourier

View GitHub Profile
#!/bin/bash -eu
git filter-branch --env-filter '
# name, email, and date for author and committer are all set to the preferred
# values unless the override variable is empty or undefined.
# (see git-rewrite-tree(1))
#GIT_AUTHOR_NAME
#GIT_AUTHOR_EMAIL
#GIT_AUTHOR_DATE
@qrkourier
qrkourier / 0_reuse_code.js
Created February 1, 2014 03:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Keybase proof

I hereby claim:

  • I am qrkourier on github.
  • I am kourier (https://keybase.io/kourier) on keybase.
  • I have a public key whose fingerprint is 5489 E13F 8105 64DF 47FB 9841 B694 03FA 957C 5E46

To claim this, I am signing this object:

@qrkourier
qrkourier / equivalentdomains_stackexchange.rb
Last active December 3, 2016 05:12
find equivalent domain names for the Stack Exchange network of sites for LastPass account settings
#!/usr/bin/env ruby
#
# [this lives here now](https://github.com/qrkourier/stackdom/blob/master/bin/stackdom.rb)
#
# slurp some XML over HTTP and parse to find equivalent domain
# names for the Stack Exchange network of sites
#
# shell $ gem install xml-simple domainatrix
#
@qrkourier
qrkourier / ovirt-private-ca.md
Last active October 11, 2021 07:57
Install a Server Certificate For oVirt Manager UI

Install server certificates issued by a private CA in oVirt4 Manager and Host

  • generate a signing request on the system where oVirt Manager is running (the engine server)
openssl req -new -sha256 -key /etc/pki/ovirt-engine/keys/apache.key.nopass -out /tmp/engine.csr
  • Submit the CSR to the issuer and wait. Or, if you are the issuer and you happen to be using FreeIPA/IdM, you may issue the certificate with ipa-admintools. For example,
@qrkourier
qrkourier / shufpad.sh
Last active December 3, 2016 05:12
Shuffle, pad with a random duration of silence, and concatenate a bunch of .mp3 files
#!/bin/bash -u
#
# [this lives here now](https://github.com/qrkourier/shufflepad-sound-machine/blob/master/bin/shufflepad.sh)
donames(){
find -mindepth 1 -maxdepth 1 -type f -iname '*.mp3' | egrep '\s' | \
while read pad;do
mv -v "$pad" $(sed -r 's/[-)(_ ]+//g'<<<"${pad#./}")
done
}
# ansible playbook illustrating two approaches to change a list of users' uid:gid and
# update homedir files owner and mode to match
- hosts: all
vars:
user_dict:
bob: 2001
alice: 2002
user_list:
- bob
- alice
#!/usr/bin/env python
#
# @qrkourier (2017)
#
# print the estimated USD yield for a given Ethermine API URL
#
# $ ethermine-yield.py https://ethermine.org/api/miner_new/9a0C4548c8b827e01aF1dc3AF9373830
# $1.28/day
# $8.97/week
# $38.99/month
@qrkourier
qrkourier / docker-compose.yml
Last active November 13, 2017 16:40
put metrics in Elasticsearch from the Nicehash API and the Nvidia driver (e.g., GPU temperature)
version: '3.2'
services:
elasticsearch:
image: "docker.elastic.co/elasticsearch/elasticsearch:5.5.2"
environment:
- http.host=0.0.0.0
- transport.host=127.0.0.1
@qrkourier
qrkourier / miner.sh
Last active October 21, 2021 16:01
configure and launch coin miners on Linux
#!/bin/bash -u
#
_help(){
cat >&2 <<-EOF
Usage: $1 [OPTION] ...
-g use Nvidia GPU(s)
-a ALGORITHM mining algorithm (e.g., scrypt, equihash)
-u BITCOIN_ADDRESS your Nicehash wallet address