Skip to content

Instantly share code, notes, and snippets.

View dbrgn's full-sized avatar

Danilo Bargen dbrgn

View GitHub Profile
TASK: [edxapp | syncdb and migrate] *******************************************
failed: [52.19.185.231] => (item=lms) => {"changed": true, "cmd": ["/edx/bin/edxapp-syncdb-lms"], "delta": "0:00:19.840901", "end": "2015-08-27 09:15:08.920340", "item": "lms", "rc": 1, "start": "2015-08-27 09:14:49.079439", "warnings": []}
stderr: warning: unable to access '/root/.config/git/attributes': Permission denied
2015-08-27 05:14:50,577 INFO 21831 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
FATAL ERROR - The following SQL query failed: alter table `auth_user` drop `website`, drop `about`, drop `gold`, drop `email_isvalid`, drop `real_name`, drop `location`, drop `reputation`, drop `gravatar`, drop `bronze`, drop `last_seen`, drop `silver`, drop `questions_per_page`, drop `new_response_count`, drop `seen_response_count`;
The error was: (1091, "Can't DROP 'website'; check that column/key exists")
FATAL ERROR - The following SQL query failed: DROP INDEX `student_testcenterregistrat
@dbrgn
dbrgn / 1.js
Created February 3, 2014 14:18
> var name = 'World!';
undefined
> (function () {
... if (typeof name === 'undefined') {
..... console.log('Goodbye ' + name);
..... } else {
..... console.log('Hello ' + name);
..... }
... })();
Hello World!
2014-02-12 14:01:35 @aendu: Ich frage mich ja, wo die Wurzel DIESES Übels liegt. https://twitter.com/madmenna/status/433585834193715200 …
2014-02-12 13:58:13 @MadMenNa: Entschuldigung, aber das geht definitiv zu weit. https://twitter.com/andbhold/status/433563855596556289 …
2014-02-12 12:30:53 @andbhold: Jetzt fängt der @Ugugu auch noch an damit: https://twitter.com/Ugugu/status/433563375721660417 …
2014-02-12 12:28:58 @Ugugu: spinnen jetzt alle? https://twitter.com/patman27/status/433559982853066752 …
2014-02-12 12:15:29 @patman27: krass!!
https://twitter.com/sixtus/status/433558970494496768 …
2014-02-12 12:11:28 @sixtus: Boah! Nerv! Und jetzt auch noch das! https://twitter.com/ReichelS/status/433557896753082368 …
2014-02-12 12:07:12 @ReichelS: genau das ist der grund, warum twitter vor die hunde geht: https://twitter.com/mspro/status/433556778983624704 …
2014-02-12 12:02:45 @mspro: orrr, muss das sein? https://twitter.com/totalreflexion/status/433543227249926144 …
2014-02-12 11:08:54 @totalreflexion: Warum
# -*- coding: utf-8 -*-
"""
Tracing the twitter chain, down the rabbit hole.
Dependencies:
- requests
- beautifulsoup4
"""
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dbrgn
dbrgn / gist:9210334
Created February 25, 2014 14:53
Parse env vars from supervisor config file
cat /etc/supervisor/conf.d/radar.conf | grep environment | uniq | sed 's/environment=/export /' | sed 's/;/\nexport /g' | sed 's/%%/%/g' | sed 's/\$/\\\$/g' | head -n -1
{
"metadata": {
"name": "aes"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@dbrgn
dbrgn / gist:05c18609a8e744866b62
Created April 29, 2014 21:50
open-aid nameservers
dns6.pointhq.com
dns7.pointhq.com
dns2.pointhq.com
@dbrgn
dbrgn / 1_before.py
Last active August 29, 2015 14:00
before / after prefetch
In [1]: from apps.swid.models import Tag
In [2]: s = Session.objects.latest()
QUERY = u'SELECT "sessions"."id", "sessions"."time", "sessions"."connection", "sessions"."identity", "sessions"."device", "sessions"."rec" FROM "sessions" ORDER BY "sessions"."time" DESC LIMIT 1' - PARAMS = ()
Execution time: 0.004259s [Database: default]
In [3]: tags = Tag.get_installed_tags_with_time(s)
QUERY = u'SELECT "devices"."id", "devices"."value", "devices"."description", "devices"."product", "devices"."created", "devices"."trusted" FROM "devices" WHERE "devices"."id" = %s ' - PARAMS = (20,)
"""
Small program to show the acceleration of the x and y axis on the LEDs. The
more you accelerate the board, the more LEDs light up.
An easy way to test this is to hold the board vertically. This causes the
gravity to "pull" on the accelerator – the LEDs light up.
"""
import pyb
import math