Skip to content

Instantly share code, notes, and snippets.

View pierrenel's full-sized avatar
:shipit:

Pierre Nel pierrenel

:shipit:
View GitHub Profile
Unable to import sentry.filters.SiteFilter
Traceback (most recent call last):
File "/srv/www/sentry/lib/python2.6/site-packages/sentry-5.0.21-py2.6.egg/sentry/filters/helpers.py", line 35, in get_filters
cls = getattr(module, class_name)
AttributeError: 'module' object has no attribute 'SiteFilter'
Unable to import sentry.filters.ServerNameFilter
Traceback (most recent call last):
File "/srv/www/sentry/lib/python2.6/site-packages/sentry-5.0.21-py2.6.egg/sentry/filters/helpers.py", line 35, in get_filters
cls = getattr(module, class_name)
AttributeError: 'module' object has no attribute 'ServerNameFilter'
@pierrenel
pierrenel / gist:3826472
Created October 3, 2012 11:26
apachesolr update 7012
/**
* Rename some variables and update the database tables
*/
function apachesolr_update_7012() {
module_load_include('inc', 'apachesolr', 'apachesolr.index');
$env_id = apachesolr_default_environment();
// Variable changed from integer to array with environment integers
$stored = variable_get('apachesolr_index_last', array());
if (isset($stored['apachesolr'])) {
@pierrenel
pierrenel / makeapp.sh
Created March 31, 2012 09:53 — forked from demonbane/makeapp.sh
Create a Fluid-style app launcher for single-window Chrome instances on OSX
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
@pierrenel
pierrenel / protovisForceTest.html
Created June 22, 2011 15:18 — forked from psychemedia/protovisForceTest.html
First attempt at plugging Twitter social network into force directed layout using protovis. Doesn't work...:-( Race condition.. Need to hold off rendering the graph till all the data is in...
<html><head><title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript" src="../protovis-3.2/protovis-r3.2.js"></script>
<script type="text/javascript">
//getNet is where we get a list of Twitter usernames
function getNet(){
url="http://search.twitter.com/search.json?q=jisc11&rpp=100&callback=?"
@pierrenel
pierrenel / Git + Dropbox
Created April 10, 2011 16:15
Via HackerNews at some point, how to use Dropbox & Git
Using git+dropbox together effectively? - Stack Overflow
I think that git on dropbox is great. I use it all of the time. I have multiple computers (two at home and one at work) that I use dropbox as a central bare repo. Since I don’t want to host it on a public service and I don’t have access to a server that I can always ssh to, Dropbox takes care of this by syncing (very quickly) in the background.
Setup is something like this:
~/project $ git init
~/project $ git add .
~/project $ git commit -m "first commit"
~/project $ cd ~/Dropbox/git