Skip to content

Instantly share code, notes, and snippets.

Richard Willis badsyntax

Block or report user

Report or block badsyntax

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
View .bashrc
nvm() {
echo "Lazy loading nvm..."
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm
}
function setup-prompt() {
if [ -f "$(brew --prefix)/etc/bash_completion" ]; then
. $(brew --prefix)/etc/bash_completion
@badsyntax
badsyntax / iterm2-colors.itermcolors
Created Jun 20, 2019
iterm2-colors.itermcolors
View iterm2-colors.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
View .bashrc
# Getting started
# 1. Install homebrew: https://brew.sh/
# 2. Install nvm: https://github.com/nvm-sh/nvm
# 3. Install other stuff:
# brew install bash-completion
# brew install git
# brew install lolcat
# brew install bash (then folllow instructions here: https://apple.stackexchange.com/a/292760)
# 4. Run: echo "source ./.bashrc" > ~/.bash_profile
# 5. Open a new iterm window
@badsyntax
badsyntax / launch.json
Created Jun 19, 2019
Debuggin react-scripts tests
View launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug CRA Tests",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts",
"args": [
"test",
@badsyntax
badsyntax / epub-to-pdf.sh
Last active Jun 17, 2019
epub-to-pdf.sh
View epub-to-pdf.sh
pandoc -V geometry:margin=0.5in -t latex book.epub -o out.pdf && \
pdfjam out.pdf --nup 2x1 --landscape --outfile combined.pdf
@badsyntax
badsyntax / INSTRUCTIONS.md
Last active May 2, 2019
Getting started with Go development on macOS
View INSTRUCTIONS.md
View basic_settings.json
{
"window.zoomLevel": 1,
"eslint.autoFixOnSave": true,
"workbench.colorCustomizations": {
"statusBar.background": "#000000",
"statusBar.noFolderBackground": "#000000"
},
"files.trimTrailingWhitespace": true,
"editor.renderWhitespace": "all"
}
@badsyntax
badsyntax / INSTRUCTIONS.md
Last active Jun 6, 2019
Getting started with Java development on macOS
View INSTRUCTIONS.md

Getting started with Java development on macOS

Install multiple Java versions

To start, list current installed Java versions:

/usr/libexec/java_home -verbose
View cli.js
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const walk = require('walk');
const yargs = require('yargs');
const getOwnersForFile = require('./get-owners-for-file');
const argv = yargs.command('$0 [options] <path>', false, _yargs => {
_yargs
@badsyntax
badsyntax / .bashrc
Last active Nov 6, 2018
latest .bashrc
View .bashrc
shopt -s autocd
shopt -s cdspell
shopt -s direxpand
shopt -s dirspell
alias ls="ls -G"
export GREP_OPTIONS='--color=always'
if [ -f "$(brew --prefix)/etc/bash_completion" ]; then
. $(brew --prefix)/etc/bash_completion
You can’t perform that action at this time.