Skip to content

Instantly share code, notes, and snippets.

I don't use GitHub

Beau beaumartinez

I don't use GitHub
View GitHub Profile
iamdamian / userChrome.css
Last active June 23, 2019 22:08
Switching from Chrome to Firefox? Fix Firefox's look & feel with a few lines of CSS
View userChrome.css
/* How do you use this? See */
/* Hide blue stripe on active tab */
.tab-line[selected="true"] {
opacity: 0 !important;
/* Hide gray stripe on tab being hovered over */
.tabbrowser-tab:hover .tab-line {
opacity: 0 !important;
levelsio / levelsio-by.html
Last active March 10, 2021 05:20
Maker Link (aka the @levelsio by link)
View levelsio-by.html
<!-- Maker Link by @levelsio -->
<!-- MIT License -->
body {
.levelsio-by {
font-family:"Helvetica Neue",sans-serif;
levelsio / btc-eth-dca-buy.php
Last active January 6, 2023 22:04
This script runs daily and "Dollar Cost Average"-buys $40 BTC and $10 ETH per day
View btc-eth-dca-buy.php
// by @levelsio
// 2017-08-23
// 1) buy $40/day BTC
// 2) buy $10/day ETH
simonw /
Last active April 15, 2023 12:00
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using and

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
gbaman /
Last active May 18, 2023 22:02
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details -

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

yefim /
Last active April 7, 2023 16:11
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
"AWSEBDockerrunVersion": "1",
"Image": {
"Update": "true"
"Ports": [
"ContainerPort": "443"
codeinthehole / boo
Created April 15, 2016 08:20
Notifier script to use with long-running commands
View boo
#!/usr/bin/env bash
# Show an OSX alert
# This is useful when used in conjunction with a long-running script. Use this script to
# get a notification when te long-running script finishes.
# Eg:
# $ ./someprocess ; boo
rauchg /
Last active April 21, 2023 17:13
Wack0 /
Last active June 10, 2022 12:39
Torrents Time bundles certificates and private keys.

Torrents Time bundles certificates and private keys

So, with all the news about how Torrents Time is insecure.. I figured I might as well reverse it.

It seems to have three components, one (on windows) is a native service (TTService.exe) that runs as SYSTEM, another (TTPlayer.exe) runs under a lower privileged user. There's also a nodejs application, server.js.

The native service seems to set up a localhost HTTPd, on either port 12400, 11400, 10400 or 9400, using whichever is open.

So, I browsed to it, and was astonished to discover it was running with TLS, and gave the browser a valid certificate, signed by Thawte! (the cert was issued to, obviously to work around new CA rules. For the record, it currently resolves to as you'd probably expect.)

gbaman /
Last active April 21, 2023 09:54
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int