Skip to content

Instantly share code, notes, and snippets.

View barnumbirr's full-sized avatar

Martin Simon barnumbirr

View GitHub Profile
@barnumbirr
barnumbirr / viedemerde.py
Last active August 29, 2015 14:00
Parse viedemerde.fr for a random quote.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import urllib
__title__ = 'viedemerde'
__version__ = '0.1'
__author__ = 'Martin Simon <me@martinsimon.me>'
__license__ = 'Apache v2.0 License'
#!/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):
@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
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
#!/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')
[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
#!/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: ''
)

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:

@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

@barnumbirr
barnumbirr / sigwaitinfo.c
Created November 17, 2015 14:12
sigwaitinfo() stub for OS X
/**
* sigwaitinfo() stub for OS X
*
* Reimplements a simple version of sigwaitinfo() ignoring its info
* parameter, on top of OS X's sigwait().
*/
#include <signal.h>
int sigwaitinfo(const sigset_t *set, siginfo_t *info)