Skip to content

Instantly share code, notes, and snippets.

View sebbarg's full-sized avatar

Sebastian Bargmann sebbarg

View GitHub Profile
@sebbarg
sebbarg / gist:9125fde797ebfcfec219ffc9e428ed7b
Created September 1, 2018 17:27
vscode/osx python settings
{
"python.pythonPath": "/usr/local/bin/python3",
"python.linting.pylintArgs": [
"--errors-only",
"--extension-pkg-whitelist=pygame"
]
}
@sebbarg
sebbarg / gist:d70f5f45389273f203b45afe8d4fb753
Last active September 1, 2018 17:30
xterm2 / .bash_profile
export CLICOLOR=1
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=true
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[31m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '
@sebbarg
sebbarg / trajectory.py
Last active August 6, 2018 04:55
Trajectory example
# pip3 install requests
import requests
import json
from pprint import pprint
my_email = 'john@example.com'
my_token = 'johns-calculator-token'
intake = 35.01
@sebbarg
sebbarg / pgadmin4.sh
Created January 3, 2018 10:33
Linux/Docker: connect pgadmin4 to postgres running on the local host (not in a container)
#!/usr/bin/env bash
set -o nounset -o pipefail
#
# - When running this script pgadmin4 is available at http://localhost:5050
# - Postgres is tunneled through SSH and available to pgadmin4 (and anything else)
# at pghost:54320
#
# - Container: https://github.com/thaJeztah/pgadmin4-docker
#
@sebbarg
sebbarg / app.js
Created June 30, 2017 15:15
JS Example of async counting of directories and files.
#!/usr/bin/env node
//
// Example of async counting of directories and files.
//
const fs = require('fs');
const path = require('path');
let walk = function(fileOrDir, done) {
@sebbarg
sebbarg / private.xml
Last active January 24, 2016 19:24
Karabiner mappings
<?xml version="1.0"?>
<!-- https://github.com/tekezo/Karabiner/blob/master/src/bridge/generator/keycode/data/KeyCode.data -->
<!-- https://pqrs.org/osx/karabiner/xml.html.en -->
<root>
<appdef>
<appname>PARALLELS</appname>
<equal>com.parallels.desktop.console</equal>
</appdef>