Skip to content

Instantly share code, notes, and snippets.

@yarko
yarko / build_version.json
Created January 31, 2014 05:41
build_version.json - the simple version, for edx release devstack
{
GIT_ACCT: "yarko",
THEME_ACCT: "Stanford-Online",
OPEN_EDX: "edx",
edx_platform_repo: "https://{{ COMMON_GIT_MIRROR }}/{{ GIT_ACCT }}/edx-platform.git",
edx_platform_version: "yarko/fix-rake-env-assets",
edxapp_use_custom_theme: false,
edxapp_theme_source_repo: 'https://{{ COMMON_GIT_MIRROR }}/{{ THEME_ACCT }}/edx-theme.git',
edxapp_theme_version: 'master',
edxapp_theme_name: "stanford"
@yarko
yarko / django-debug-toolbar.patch
Created January 17, 2014 13:32
edx/edx-platform patch file for upgrading from django-debug-toolbar 0.9x to > 1.0x
diff --git a/cms/envs/dev.py b/cms/envs/dev.py
index ff9e650..f06b386 100644
--- a/cms/envs/dev.py
+++ b/cms/envs/dev.py
@@ -165,7 +165,7 @@ DEBUG_TOOLBAR_PANELS = (
# Django=1.3.1/1.4 where requests to views get duplicated (your method gets
# hit twice). So you can uncomment when you need to diagnose performance
# problems, but you shouldn't leave it on.
- # 'debug_toolbar.panels.profiling.ProfilingDebugPanel',
+ # 'debug_toolbar.panels.profiling.ProfilingPanel',
@yarko
yarko / gist:8161967
Created December 28, 2013 17:41
using wingIDE with flask
# snippet for debugging w/ wingIDE:
if __debug__:
from os import environ
if 'WINGDB_ACTIVE' in environ:
app.debug = False
@yarko
yarko / emotion-update.dot
Last active December 25, 2015 15:39
A graphviz representation of the update from Panskepp and Brem, "Archeology of Mind", which captures what data tells us now about affective brain systems.
/* Affective systems - then and now
*/
digraph g {
graph [nodesep="0.7", margin="0.6,0.15"];
rankdir = LR;
edge [dir="back"];
node [fontname="verdana", shape=record, style="filled", fillcolor=snow];
@yarko
yarko / problem8.py
Created October 3, 2013 05:09
grab a 1000 digit number from a web page
from lxml import html
node = html.parse('http://projecteuler.net/problem=8').getroot()
number_parts = node.cssselect('div.problem_content > p')[1].text_content().split()
print "".join(number_parts)