Skip to content

Instantly share code, notes, and snippets.

View barnumbirr's full-sized avatar

Martin Simon barnumbirr

View GitHub Profile
@barnumbirr
barnumbirr / newscript.sh
Created January 22, 2024 07:37 — forked from aaronNGi/newscript.sh
Boilerplate for new POSIX shell scripts
#!/bin/sh
prog_name=${0##*/}
version=1.0
version_text="Boilerplate for new scripts v$version"
options="h o: q v V"
help_text="Usage: $prog_name [-o <text>] [-hqvV] [<file>]...
Boilerplate for new scripts
@barnumbirr
barnumbirr / Ttg67.json
Created January 29, 2022 16:13
Table-Gadget 67 (TG67) Keyboard - VIA definition
{
"name": "TG67",
"vendorId": "0x4D54",
"productId": "0x0101",
"lighting": "qmk_rgblight",
"matrix": { "rows": 5, "cols": 15 },
"layouts": {
"keymap":
[
[
@barnumbirr
barnumbirr / serverless.md
Created April 30, 2019 23:32
Allow glob pattern in serverless.com artifact name

In serverless.yml

package:
  artifact: target/packagename-${env:MVN_VERSION}.jar

and in your Jenkins build configuration

Keybase proof

I hereby claim:

  • I am barnumbirr on github.
  • I am barnumbirr (https://keybase.io/barnumbirr) on keybase.
  • I have a public key whose fingerprint is 6F2B 0C37 3EBE 0DD7 975D 51B9 632C 2AA6 CF21 205A

To claim this, I am signing this object:

#!/usr/bin/ruby
require 'aws-sdk' # version 3
role_credentials = Aws::AssumeRoleCredentials.new(
client: Aws::STS::Client.new(access_key_id:'',
secret_access_key:''),
role_arn: '',
role_session_name: ''
)
[root@local]$ adb shell
tissot_sprout:/ $ su
tissot_sprout:/ # pm uninstall --user 0 com.android.camera
Success
tissot_sprout:/ # pm uninstall --user 0 com.miui.bugreport
Success
tissot_sprout:/ # pm uninstall --user 0 com.android.chrome
Success
tissot_sprout:/ # pm uninstall --user 0 com.google.android.play.games
#!/bin/bash
if [ "$#" -ne "1" ]; then
echo "Usage: $0 package_list"
exit 1
fi
cat $1 | xargs -I {} bash -c "echo {}; brew deps {}" | sort | uniq > /tmp/brew_keep
comm -23 <(brew list -1 | sort) <(cat /tmp/brew_keep) > /tmp/brew_rm
lines=$(cat /tmp/brew_rm | wc -l | sed -e 's/ //g')
adb reboot bootloader
fastboot flash bootloader bootloader-bullhead-bhz11m.img
fastboot flash radio radio-bullhead-m8994f-2.6.37.2.21.img
fastboot flash vendor vendor-n2g47o.img
@barnumbirr
barnumbirr / LU_top200.txt
Created March 8, 2017 14:14
DMARC records for top 200 .lu domains
# https://domaintyper.com/top-websites/most-popular-websites-with-lu-domain
google.lu
lnx.lu
piraten.lu
lessentiel.lu
rtl.lu
public.lu
wort.lu
pt.lu
#!/usr/bin/env python
# http://stackoverflow.com/questions/16977588/reading-dns-packets-in-python
import pprint
import socket
import struct
def decode_labels(message, offset):