Skip to content

Instantly share code, notes, and snippets.


Brandon Brown brandonb927

View GitHub Profile
View resume.json
"meta": {
"theme": "classy"
"basics": {
"firstName": "Brandon",
"lastName": "Brown",
"name": "Brandon Brown",
"email": "",
"phone": "",
brandonb927 / template.pkr.hcl
Created Mar 23, 2021
A "truly noninteractive" Ubuntu-based Packer HCL template for dist-upgrade
View template.pkr.hcl
build {
# ...
provisioner "shell" {
inline = [
"echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections",
"sudo apt-get update",
"sudo apt-get dist-upgrade -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef -y --allow-downgrades --allow-remove-essential --allow-change-held-packages",
"sudo apt-get autoremove -y",
"sudo apt-get clean",
brandonb927 /
Last active Sep 21, 2022 — forked from kevinSuttle/
List of Usable HTML Meta and Link Tags
brandonb927 / index.js
Last active Jun 28, 2022
Cypress + Typescript ts-loader option `transpileOnly` config helps with memory-contrained machines if you're not running in the Cypress Dashboard but rather using custom Jenkins CI, etc.
View index.js
module.exports = (on, config) => {
// ...
const wpOptions = webpack.defaultOptions
wpOptions.webpackOptions.resolve = {
extensions: ['.ts', '.js'],
test: /\.ts$/,
exclude: [/node_modules/],
brandonb927 / user-config.json
Created Jun 22, 2018
A clean UI for VS Code, user configuration
View user-config.json
"editor.fontLigatures": true,
"editor.glyphMargin": false,
"editor.lineNumbers": "off",
"editor.snippetSuggestions": "top",
"editor.tabCompletion": true,
"editor.minimap.enabled": false,
"explorer.confirmDelete": false,
"explorer.openEditors.visible": 0,
"window.title": "${rootName}${separator}${activeEditorMedium}",
brandonb927 / puppeteer-vscode-scraper.js
Last active Feb 22, 2022
A tiny self-contained node script to scrape the VS Code Marketplace website to get all the information about the packages you have installed in VS Code.
View puppeteer-vscode-scraper.js
#!/usr/bin/env node
// $ npm install -d fs-extra ora open puppeteer
const { spawn } = require('child_process')
const readline = require('readline')
const path = require('path')
const fse = require('fs-extra')
const open = require('open')
brandonb927 /
Created Nov 30, 2016 — forked from ob7/
Use FFmpeg to resize and generate .mp4 & .webm videos from any source video.
#- Scale can be used as is which will set the height to 560 but keep aspect ratio for width.
#- Other options include setting both with & height
#- Watch out for sizing errors when not divisible by 2
if [[ ! "$1" || ! "$2" || ! "$3" ]] || [[ "$1" = '--help' ]]; then
if [[ "$1" = '--help' ]]; then
echo " "
brandonb927 / hull-height-square.css
Created Aug 29, 2016
Makes a square as large as possible in the viewport without overflowing and centres it vertically and horizontally -
View hull-height-square.css
.elem {
width: 100vmin;
height: 100vmin;
margin-top: calc((100vh - 100vmin)/2);
margin-left: calc((100vw - 100vmin)/2);
brandonb927 /
Last active Feb 22, 2022 — forked from remy/
Check original domain registration date of a domain
DOMAIN=''; curl\?limit\=1\&url\=$DOMAIN | awk '{ print $2 }' | xargs date -j -f "%Y%m%d%H%M%S"
brandonb927 / post-merge
Created Jun 28, 2016 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed. In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed. Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
View post-merge
#/usr/bin/env bash
# MIT © Sindre Sorhus -
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"