Skip to content

Instantly share code, notes, and snippets.

@badsyntax
badsyntax / macos_virtualbox_windows10_remote_desktop.md
Last active January 2, 2020 19:20
Use remote desktop to connect to headless windows virtualbox guest for improved graphic performance
@badsyntax
badsyntax / virtual_env_macos.md
Last active August 21, 2019 19:03
Setting up virtualenv on macos
brew install python
brew install python2
sudo easy_install pip
sudo pip install virtualenv
virtualenv -p python3.7 .
@badsyntax
badsyntax / .bashrc
Last active August 20, 2019 08:16
.bashrc
function 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 June 20, 2019 17:40
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>
# 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 June 19, 2019 19:38
Debuggin react-scripts tests
{
"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 June 17, 2019 21:04
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 12:13
Getting started with Go development on macOS
{
"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 December 3, 2024 16:09
Getting started with Java development on macOS

Getting started with Java development on macOS

Install multiple Java versions

To start, list current installed Java versions:

/usr/libexec/java_home -verbose