Skip to content

Instantly share code, notes, and snippets.

View brandonb927's full-sized avatar

Brandon Brown brandonb927

View GitHub Profile
@brandonb927
brandonb927 / check.sh
Last active May 2, 2024 03:17 — forked from remy/check.sh
Check original domain registration date of a domain
DOMAIN='brandonb.ca'; curl http://web.archive.org/cdx/search/cdx\?limit\=1\&url\=$DOMAIN | awk '{ print $2 }' | xargs date -j -f "%Y%m%d%H%M%S"
@brandonb927
brandonb927 / convert-videos-for-web.sh
Created November 30, 2016 00:51 — forked from ob7/convert-videos-for-web.sh
Use FFmpeg to resize and generate .mp4 & .webm videos from any source video.
#!/bin/bash
#Scaling
#- 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
brandonb927 / meta-tags.md
Last active February 21, 2024 11:41 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags
@brandonb927
brandonb927 / raspi-motd.sh
Created December 8, 2012 20:47 — forked from piksel/raspi-motd.sh
Script for setting a nice raspberry pi logo as MOTD on debian.
#!/bin/bash
logo="$(tput setaf 2)
.~~. .~~.
'. \ ' ' / .'$(tput setaf 1)
.~ .~~~..~. $(tput sgr0) _ _ $(tput setaf 1)
: .~.'~'.~. : $(tput sgr0) ___ ___ ___ ___| |_ ___ ___ ___ _ _ ___|_|$(tput setaf 1)
~ ( ) ( ) ~ $(tput sgr0) | _| .'|_ -| . | . | -_| _| _| | | | . | |$(tput setaf 1)
( : '~'.~.'~' : ) $(tput sgr0) |_| |__,|___| _|___|___|_| |_| |_ | | _|_|$(tput setaf 1)
~ .~ ( ) ~. ~ $(tput sgr0) |_| |___| |_| $(tput setaf 1)
#!/bin/bash
# This script will delete *all* local and remote tags from any git repo you run
# it in, unless they are a major branch, or the most previous minor branches.
# If 1.4.3 is the latest patch/hotfix branch, all 1.*.* branchs will be deleted,
# but all major/minor releases will be left
#
# This script will not delete branches; just tags.
set -e
@brandonb927
brandonb927 / ErrorHandler.js
Last active February 22, 2022 01:26 — forked from mikevalstar/ErrorHandler.js
Modified again to use Handlebars template instead of Jade
/**
* Modified from the Connect project: https://github.com/senchalabs/connect/blob/master/lib/middleware/errorHandler.js
*
* Flexible error handler, providing (_optional_) stack traces and logging
* and error message responses for requests accepting text, html, or json.
*
* Options:
*
* - `showStack` respond with both the error message and stack trace. Defaults to `false`
* - `showMessage`, respond with the exception message only. Defaults to `false`
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "src/js/*.js'",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@brandonb927
brandonb927 / post-merge
Created June 28, 2016 03:20 — 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/`.
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# 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"
@brandonb927
brandonb927 / LICENSE.md
Last active October 11, 2020 09:13 — forked from valpackett/LICENSE.md
Use Markdown in Evernote with Marked.app
       DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
               Version 2, December 2004

Copyright (C) 2012 Brandon B. brandon@brandonbrown.io

Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}