Skip to content

Instantly share code, notes, and snippets.

View batkinson's full-sized avatar

Brent Atkinson batkinson

  • Garmin International
  • Portland, Maine, USA
View GitHub Profile
diff -urN trac-backlog-0.2.2/backlog/web_ui.py trac-backlog-0.2.2-readonly-without-perms/backlog/web_ui.py
--- trac-backlog-0.2.2/backlog/web_ui.py 2011-10-10 13:09:39.000000000 +0000
+++ trac-backlog-0.2.2-readonly-without-perms/backlog/web_ui.py 2011-10-13 07:54:37.261926597 +0000
@@ -10,6 +10,7 @@
from trac.core import *
from trac.db import DatabaseManager
from trac.env import IEnvironmentSetupParticipant
+from trac.perm import IPermissionRequestor
from trac.ticket.api import ITicketChangeListener
from trac.ticket.model import Ticket
@batkinson
batkinson / gist:1394344
Created November 25, 2011 20:20
Patch for trac-backlog #5
diff -urN trac-backlog-0.2.2/backlog/prefs.py trac-backlog-0.2.2-fc/backlog/prefs.py
--- trac-backlog-0.2.2/backlog/prefs.py 1970-01-01 00:00:00.000000000 +0000
+++ trac-backlog-0.2.2-fc/backlog/prefs.py 2011-11-25 20:06:12.591248563 +0000
@@ -0,0 +1,47 @@
+# Copyright (C) 2009 John Szakmeister
+# All rights reserved.
+#
+# This software is licensed as described in the file LICENSE.txt, which
+# you should have received as part of this distribution.
+
@batkinson
batkinson / tour.golang.com#73.go
Last active August 29, 2015 14:08
Go language tour #73 solution
package main
import (
"fmt"
)
type Fetcher interface {
Fetch(url string) (body string, urls []string, err error)
}
# fixes missing package errors
sudo apt-get update
# installs the requisite packages
sudo apt-get install python-pip git chromium-browser chromium-chromedriver xvfb
# Create an ld.so.conf config file (/etc/ld.so.conf.d/chromium-libs.conf)
# Use the editor to include just the line '/usr/lib/chromium-browser/libs'
sudo vi /etc/ld.so.conf.d/chromium-libs.conf
# Run ldconfig to cache the shared libraries, including chromium's now
sudo ldconfig
# Finally, check that you can run chromedriver without errors
/usr/lib/chromium-browser/chromedriver
<Ctrl-c>
# Clone the project from github
git clone https://github.com/batkinson/colbertix.git
# Change directory to the project and change to the chromium branch
cd colbertix/
git checkout chromium
# Install the python package requirements
sudo pip install -r requirements.txt
# Copy the example configuration so we can edit it
cp config.ini-example config.ini
# Edit the configuration, changing the example values to your personal information
vi config.ini
[user-info]
first_name: John
last_name: Doe
zip: 10003
state: NY
country: US
daytime_phone: 6165551212
evening_phone: 6165551212
mobile_phone: 6165551212
# Run the colbertix program, detach from it
screen
xvfb-run ./colbertix.py
<ctrl-a><ctrl-d>
# Close your SSH connection to the instance
exit
# You can later reconnect to the running program session by issuing
screen -r
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWUPSTREAM="auto"
export GIT_PS1_SHOWCOLORHINTS=1
export PS1="\[\e]0;\w\a\]\[\e[32m\]\u@\h \[\e[33m\]\w \[\e[32m\]\$(__git_ps1)\[\e[0m\]\n\$ "
export PROMPT_COMMAND='__git_ps1 "\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]" "\\\$ "'