Skip to content

Instantly share code, notes, and snippets.

View stvnwlsn's full-sized avatar
💭
I may be slow to respond.

stvnwlsn

💭
I may be slow to respond.
View GitHub Profile
//question 2 c)i)
@Test
public void test1Enrol()
{
//set up the fixture and the input
Instructor instructor1 = new Instructor(2);
Session session1 = new Session("session1", instructor1);
Name name1 = new Name("Mr", "A", "Customer");
Customer customer1 = new Customer(name1);
@stvnwlsn
stvnwlsn / django_x12-10
Last active December 14, 2015 17:38
Setup Django on Xubuntu 12-10
#links
http://mysql-python.blogspot.co.uk/2012/11/is-mysqldb-hard-to-install.html
https://docs.djangoproject.com/en/dev/ref/databases/#mysql-notes
# upgrade pip
sudo pip install --upgrade pip
# close and open shell to use new pip version
# upgrade distribute
@stvnwlsn
stvnwlsn / gist:5127971
Last active December 14, 2015 18:18
Install Vim environment
# Clone repo
git clone git@github.com:stvnwlsn/.vim.git
# Symbolic link to .vimrc
ln -s ~/.vim/.vimrc ~/.vimrc
# Install modules
cd ~/.vim && git submodule update --init
# pep8 needs to be installed on system
@stvnwlsn
stvnwlsn / .bashrc
Last active December 14, 2015 20:28
some .bashrc aliases
# virtualenv
alias act='source bin/activate'
# git
alias gp='git push origin master' # git push alias
alias gs='git status'
alias ga='git add .'
alias gc='git commit'
alias gb='git branch '
alias gd='git diff'
@stvnwlsn
stvnwlsn / gist:5221087
Created March 22, 2013 13:04
Install Scrapy in virtualenv
# Work in progress
# Need to test in virtualbox
sudo apt-get install libxml2-dev libxslt-dev
sudo apt-get install python-lxml
virtualenv --distribute venv
source venv/bin/activate
@stvnwlsn
stvnwlsn / bashcmd
Last active December 15, 2015 15:49
useful bash commands
# Copy the contents of file to selection clipboard
xclip -sel clip < <inputfile>
# Refresh shell environment without closing it
exec su - <username>
# Perl one-liner to search and replace all occurrences of
# a word in a bunch of files after backing them up.
perl -pi.bak -e 's/blue/red/g' *.dat
@stvnwlsn
stvnwlsn / gist:7053526
Last active December 25, 2015 22:59
matplotlib for python3
sudo pip-3.3 install numpy #necessary?
sudo apt-get build-dep python-matplotlib
sudo pip-3.3 install matplotlib
@stvnwlsn
stvnwlsn / gist:7268166
Created November 1, 2013 16:42
terminal prompt
export PS1="\u@\w$ "
@stvnwlsn
stvnwlsn / gist:7269714
Last active December 27, 2015 04:49
Fresh install
Add items to top panel
Right click panel > Panel > Panel Preferences > Items
Workspace Switcher
Action buttons
Separator
Xubuntu Whisper Menu
Setting > Panel > Items > Whisker Menu Settings > Behaviour > Display recently used by default
Panel at bottom
@stvnwlsn
stvnwlsn / bands.txt
Last active January 3, 2021 12:43
Flexget .config for http://www.dimeadozen.org/
- Lee Ranaldo
- Thurston Moore
- "The Fall"
- Kim Gordon
- "Sonic Youth"
- Captain Beefheart
- "Nils Frahm"
- Chelsea Light Moving
- Body Head
- Faust