Skip to content

Instantly share code, notes, and snippets.

Avatar

Dave Voutila voutilad

View GitHub Profile
@voutilad
voutilad / WebAppTest.java
Created May 9, 2015
Real-time SAIL development in Attivio Designer using Embedded Jetty
View WebAppTest.java
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 Jul 17, 2017
Just my current shell prompt...
View 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\]'
View .pylintrc
[MASTER]
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=pylint_django
View .bash_profile
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 Jan 26, 2016
Git Prompt Bash script
View .git-prompt
# 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 Feb 17, 2016
Quick CL Django Launch
View cl_django_up.sh
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
View building flask-ask on macos
#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 Feb 12, 2017
Config for making MacBook Pro touchpad not suck under X11
View 50-mtrack.conf
###############################################################
# 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 Mar 23, 2017
MacBook keyboards on FreeBSD
View macbook-kbd-freebsd.md

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.