Skip to content

Instantly share code, notes, and snippets.

View brentley's full-sized avatar

Brent Langston brentley

View GitHub Profile

Keybase proof

I hereby claim:

  • I am brentley on github.
  • I am brentley (https://keybase.io/brentley) on keybase.
  • I have a public key ASBNo9iQrU3_lbXXrgwNOzn9ROkGwko7UQRRl_aX13GcRgo

To claim this, I am signing this object:

@brentley
brentley / .bash_profile
Created October 24, 2018 11:03 — forked from chrisberkhout/.bash_profile
Git aliases taken from oh-my-zsh's git plugin and translated to bash
# git aliases - taken from oh-my-zsh's git plugin and translated to bash
# https://github.com/robbyrussell/oh-my-zsh/wiki/Cheatsheet#helpful-aliases-for-common-git-tasks
# https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh
function git_current_branch() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || \
ref=$(git rev-parse --short HEAD 2> /dev/null) || return
echo ${ref#refs/heads/}
}
function git_current_repository() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || \

the first part needs to be done in a crosh shell after enabling linux in chrome settings.

(Note: I didn't do this after my most recent powerwash... the crosh commands may be unnecessary now)

ctrl-alt-t to get a crosh shell

crosh> vmc start termina
lxc profile unset default security.syscalls.blacklist
lxc profile apply penguin default
lxc restart --force penguin
@brentley
brentley / WireGuard_Setup.txt
Created July 6, 2019 15:11 — forked from chrisswanda/WireGuard_Setup.txt
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@brentley
brentley / README.md
Created July 6, 2019 15:16 — forked from pamolloy/README.md
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.

cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key

TL;DR The Facebook and Messenger apps are battery hogs. Replace them if possible.


I'll start by saying these experiments aren't highly scientific, but I tried to be as consistent as possible.

For each iteration, I tested from 100% charge to 97% charge. I wanted to test more than 1% because my phone seems to go from 100 to 99 relatively fast, but 99 to 98

@brentley
brentley / tampermonkey.js
Created August 10, 2020 23:42 — forked from rothgar/streamyard-tampermonkey.js
Streamyard Keyboard Shortcuts
// ==UserScript==
// @name Streamyard Keyboard Shortcuts
// @namespace http://streamyard.com
// @version 0.1
// @description Simple keyboard shortcuts for streamyard
// @author justinleegarrison@gmail.com
// @match https://streamyard.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
@brentley
brentley / puppeteer_youtube.js
Created December 10, 2020 23:08 — forked from tnolet/puppeteer_youtube.js
Puppeteer search youtube
const puppeteer = require('puppeteer')
const screenshot = 'youtube_fm_dreams_video.png'
try {
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.goto('https://youtube.com')
await page.type('#search', 'Fleetwood Mac Dreams')
await page.click('button#search-icon-legacy')
await page.waitForSelector('ytd-thumbnail.ytd-video-renderer')