Skip to content

Instantly share code, notes, and snippets.

🤓
Trying to exit emacs

Brian Gordon briangordon

🤓
Trying to exit emacs
Block or report user

Report or block briangordon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@briangordon
briangordon / animal-verbs.txt
Last active Oct 7, 2019
Animal names which are also verbs
View animal-verbs.txt
Ape his behaviors
Badger her about
Bat your eyelids
Bear fruit
Buck the system
Buffalo him into
Bug him about
Carp about
Chicken out
Clam up
@briangordon
briangordon / SNAKE.8xp
Created Oct 3, 2019
Source code for a TI-BASIC implementation of Snake
View SNAKE.8xp
{11,5,11,5,11,5→L₁
1→𝒏:dim(L₁)→L
1→S:0→T
0→C:1→P
0→W
DelVar [A]
{10,26→dim([A]
ClrHome
While 1
If P
View ufw-config.sh
# UFW configuration for a home DMZ box exposed to the public internet, with only sshd reachable from the outside world.
# In addition to setting these rules you should also:
# 1. Edit /etc/ufw/before.rules to remove the default rules which permit incoming DHCP packets from the outside world.
# 2. Edit /etc/ufw/before.rules to remove the default rules which permit incoming ICMP packets from the outside world.
# 3. Edit /etc/default/ufw to turn off non-local ipv6 because I don't know enough about it to be confident.
ufw default deny incoming
ufw default allow outgoing
ufw limit log proto tcp to 0.0.0.0/0 port ssh
ufw allow proto udp from 192.168.0.0/16 to 0.0.0.0/0 port bootpc comment "required for dhclient"
@briangordon
briangordon / office-privacy.reg
Created May 27, 2019
Microsoft recently introduced "required" telemetry for Office which cannot be disabled through the UI. This should shut it off.
View office-privacy.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Policies\Microsoft\office\common\clienttelemetry]
"sendtelemetry"=dword:00000003
@briangordon
briangordon / gitgraph-react.sh
Last active Mar 29, 2019
Steps to build gitgraph-react to play with the storybook 😵
View gitgraph-react.sh
brew install node
export PATH="$HOME/.node/bin:$PATH"
npm install -g lerna
git clone git@github.com:nicoespeon/gitgraph.js.git
echo "scripts-prepend-node-path=true" >> gitgraph.js/.npmrc
cd gitgraph.js
yarn
cd packages/gitgraph-core
yarn
cd ../gitgraph-react
@briangordon
briangordon / gitgraphjs.html
Created Mar 28, 2019
gitgraphjs.com (https://web.archive.org/web/20181222070223/http://gitgraphjs.com/) gives you the building blocks to start working with the JS version but leaves you to put it together. Here's a fully working example to get it running.
View gitgraphjs.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.15.1/gitgraph.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.15.1/gitgraph.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/domready/1.0.8/ready.js"></script>
<script type="text/javascript">
domready(function() {
var gitgraph = new GitGraph({
template: "blackarrow",
@briangordon
briangordon / make-letters.sh
Created Mar 4, 2019
Shell script to make letter icons for Slack
View make-letters.sh
mkdir letters
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:A letters/a.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:B letters/b.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:C letters/c.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:D letters/d.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:E letters/e.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:F letters/f.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:G letters/g.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:H letters/h.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:I letters/i.png
@briangordon
briangordon / bash_ps1.sh
Last active Feb 3, 2019
By default, Debian only colorizes bash output for regular users. Rather than copy your ~/.bashrc to /root, take just take it out and have /etc/bash.bashrc source this instead.
View bash_ps1.sh
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
@briangordon
briangordon / DefaultKeyBinding.dict
Created Jan 25, 2019
Put this in ~/Library/KeyBindings/ to fix MacOS home/end keys behaving stupidly
View DefaultKeyBinding.dict
{
"\UF729" = moveToBeginningOfParagraph:; // home
"\UF72B" = moveToEndOfParagraph:; // end
"$\UF729" = moveToBeginningOfParagraphAndModifySelection:; // shift-home
"$\UF72B" = moveToEndOfParagraphAndModifySelection:; // shift-end
"^\UF729" = moveToBeginningOfDocument:; // ctrl-home
"^\UF72B" = moveToEndOfDocument:; // ctrl-end
"^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // ctrl-shift-home
"^$\UF72B" = moveToEndOfDocumentAndModifySelection:; // ctrl-shift-end
}
View keybase.md

Keybase proof

I hereby claim:

  • I am briangordon on github.
  • I am brian (https://keybase.io/brian) on keybase.
  • I have a public key ASA8l7cfD9ar5ZcXq_MkGZCVjV9B9eo9l1dpQ5D4LsgOsAo

To claim this, I am signing this object:

You can’t perform that action at this time.