Skip to content

Instantly share code, notes, and snippets.

View nrb's full-sized avatar
🤔

Nolan Brubaker nrb

🤔
View GitHub Profile
@nrb
nrb / gist:1189694
Created September 2, 2011 19:49 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: Research programmer, will be freelancing full time come 9/12/2011
Favorite Python project: SQLAlchemy or NLTK
Favorite Conference: PyCon
Python Experience Level: Intermediate
Inspecting the available layers in GeoServer ...
Traceback (most recent call last):
File "/Users/nrb/dev/geonode/bin/django-admin.py", line 5, in <module>
management.execute_from_command_line()
File "/Users/nrb/dev/geonode/lib/python2.7/site-packages/django/core/management/__init__.py", line 429, in execute_from_command_line
utility.execute()
File "/Users/nrb/dev/geonode/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/nrb/dev/geonode/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
@nrb
nrb / gist:3747300
Created September 19, 2012 02:27
"Hacerfest" notes for reference

Purpose

The goal of HacerFest is to set aside 48 hours (or really, however much you want), to not think about your day to day tasks, and focus on some creative project you've wanted to make or do.

What's it mean?

'Hacer' in the Spanish verb for 'to make' or 'to do'. It's a fantastic verb for creative work, which is often making or doing something.

@nrb
nrb / gist:7999216
Last active December 31, 2015 14:19
My PyCon 2014 talk proposal, for sharing.

*** what about long term vs short term use? ***** Perceived Differences Between Devs and Designers

  • Developers don't have to worry about design
    • Or, only 'hybrids' have to.
  • Design is only the front-end part of the application
    • Maaaaybe architecture design ("Big Design Up Front"/BDUF)

Both of These are Wrong

@nrb
nrb / hide_ads.css
Last active August 29, 2015 14:05
hide_ads.css
/* Safari: Preferences > Advanced > User Stylesheet
Firefox: Insert into ~/Library/Application\ Support/Firefox/Profiles/<profile_id>/chrome/userContent.css
For myself, I keep the file in Dropbox, and I symlinked it into the FF location.
*/
/* Hides Facebook ad divs, and the like button */
.ego_section { display: none; }
div#pagesNav { display: none; }
div#appsNav { display: none; }
@nrb
nrb / spam_horizon.sh
Created September 12, 2014 16:21
Reproduce Horizon bug #1345955
#!/bin/bash
COUNTER=0
while [ $COUNTER -lt 10000 ]; do
curl http://localhost:8081 & curl http://localhost:8081
let COUNTER=$COUNTER+1
echo "FINISHED ATTEMPT $COUNTER"
done
@nrb
nrb / horizon
Created September 12, 2014 17:00
iff --git a/lib/horizon b/lib/horizon
index 614a0c8..802b80a 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -92,6 +92,8 @@ function init_horizon {
local local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py
cp $HORIZON_SETTINGS $local_settings
+ _horizon_config_set $local_settings "" COMPRESS_OFFLINE True
+
py26 inst-nodeps: /Users/nola7999/projects/oslo.config/.tox/dist/oslo.config-1.5.0.6.g063a5ef.zip
py26 runtests: PYTHONHASHSEED='3510259001'
py26 runtests: commands[0] | python setup.py testr --slowest --testr-args=
running testr
running=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ . --list
db type could not be determined
error: testr failed (3)
ERROR: InvocationError: '/Users/nola7999/projects/oslo.config/.tox/py26/bin/python setup.py testr --slowest --testr-args='
@nrb
nrb / scraper.py
Created January 20, 2015 20:01
A nightfall/heroic strike information scraper
from functools import partial
import requests
import bs4
template = "%(strike)s. Modifiers: %(mods)s"
event_url = 'http://destinytracker.com/destiny/events'
def get_mods(soup, index):
mod_list = soup.select('ul')[index]
failed: [znc.nbrubaker.com] => {"cmd": "/opt/helga/bin/pip install helga==1.5.1", "failed": true}
msg: stdout: Collecting helga==1.5.1
Downloading helga-1.5.1.tar.gz (73kB)
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-i0TfJo/helga/setup.py", line 43, in <module>
str(req.req) for req in parse_requirements('requirements.txt')
File "/opt/helga/local/lib/python2.7/site-packages/pip/req/req_file.py", line 19, in parse_requirements
"parse_requirements() missing 1 required keyword argument: "
TypeError: parse_requirements() missing 1 required keyword argument: 'session'