Skip to content

Instantly share code, notes, and snippets.

View voutilad's full-sized avatar
🥸

Dave Voutila voutilad

🥸
View GitHub Profile
@voutilad
voutilad / WebAppTest.java
Created May 9, 2015 20:59
Real-time SAIL development in Attivio Designer using Embedded Jetty
package com.attivio.testproject2;
import java.io.IOException;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;
import org.junit.BeforeClass;
import org.junit.Test;
import com.attivio.TestUtils;
@voutilad
voutilad / Current Shell Prompt
Last active July 17, 2017 21:58
Just my current shell prompt...
# Kyle's old prompt:
# PS1="\[\033[0;33m\][\!]\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`[\u.\h: \`if [[ `pwd|wc -c|tr -d " "` > 18 ]]; then echo "\\W"; else echo "\\w"; fi\`]\$\[\033[0m\] "; echo -ne "\033]0;`hostname -s`:`pwd`\007"
# Current one that's Git-friendly:
# (make sure to grab:
# curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
# )
PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\]\[\e[1;33m\]$(__git_ps1 "(%s)")\[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]'
@voutilad
voutilad / .pylintrc
Created January 10, 2016 20:35
.pylintrc
[MASTER]
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=pylint_django
@voutilad
voutilad / .bash_profile
Created January 26, 2016 20:30
Laptop Prompt
source ~/.git-prompt.sh
# PS1="\[$GREEN\]\t\[$RED\]-\[$BLUE\]\u\[$YELLOW\]\[$YELLOW\]\w\[\033[m\]\[$MAGENTA\]\$(__git_ps1)\[$WHITE\]\$ "
PS1='\[\e[0;32m\]\u\[\e[m\]@\h \[\e[1;34m\]\W\[\e[m\]\[\e[1;33m\]$(__git_ps1 "(%s)")\[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]'
# PS1='[\[$GREEN\]\u@\h \W$(__git_ps1 " (%s)")]\$ '
# PS1="\[\033[0;33m\][\!]\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`[\u.\h: \`if [[ `pwd|wc -c|tr -d " "` > 18 ]]; then echo "\\W"; else echo "\\w"; fi\`]\$\[\033[0m\] "; echo -ne "\033]0;`hostname -s`:`pwd`\007"
source ~/.bashrc
@voutilad
voutilad / .git-prompt
Created January 26, 2016 20:31
Git Prompt Bash script
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
@voutilad
voutilad / cl_django_up.sh
Created February 17, 2016 22:24
Quick CL Django Launch
cd /var/www/courtlistener && python manage.py migrate && python manage.py loaddata cl/visualizations/fixtures/scotus_map_data.json && python manage.py cl_update_index --type opinions --solr-url http://127.0.0.1:8983/solr/collection1 --update --everything && python manage.py runserver 0.0.0.0:8000
#assuming you've done `brew install openssl`
env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" python setup.py install
@voutilad
voutilad / 50-mtrack.conf
Created February 12, 2017 01:58
Config for making MacBook Pro touchpad not suck under X11
###############################################################
# Config for making MacBook Pro touchpad not suck under X11
###############################################################
Section "InputClass"
Identifier "touchpad catchall"
Driver "mtrack"
MatchIsTouchpad "on"
Option "Sensitivity" "0.2" # fixes jerky motion. crank up mouse pointer acceleration in gnome settings to accomodate for higher speed.
Option "IgnoreThumb" "true" # ignore resting thumb
@voutilad
voutilad / macbook-kbd-freebsd.md
Last active March 23, 2017 15:56
MacBook keyboards on FreeBSD

oh my tilde

On both 11.0-RELEASE and 12.0-CURRENT, the default keymap doesn't properly work with MacBook keyboards...the classic backtick/tilde issue where instead you get angle brackets or worst case nothing! (Though often fn+UP will generate a tilde!)

fixing on the console

Using xkbdcontrol, I modified the currently working keymap based on what was running by default on TrueOS at time of writing.

  1. Place this in a file like usr/share/syscons/keymaps/us.macbook.kbd.