I hereby claim:
- I am j4mie on github.
- I am recurse (https://keybase.io/recurse) on keybase.
- I have a public key whose fingerprint is D8BA 7050 B327 D160 4C39 58D5 9CD6 DBBD F454 4518
To claim this, I am signing this object:
#!/usr/bin/env bash | |
# This query adds up the lengths of all the /app/usage events in ZOBJECT. | |
# This gives an approximation of how long the machine has been used for today, assuming | |
# the display goes to sleep fairly quickly when the machine is not used (eg 1 minute). | |
# You'll need to give xbar "Full Disk Access" | |
# (System Preferences -> Security and Privacy -> Privacy) for this to work. | |
DBPATH=~/Library/Application\ Support/Knowledge/knowledgeC.db |
from contextlib import contextmanager | |
from django.db import connections | |
class QueriesDisabledError(Exception): | |
pass | |
def fake(*args, **kwargs): | |
raise QueriesDisabledError() |
I hereby claim:
To claim this, I am signing this object:
Since Django 1.5.5, CSRF tokens are rotated on login. That makes it trivial to trigger a CSRF error in the following way:
The CSRF token sent along with the second login attempt (in a cookie) won't match the token that was embedded in the form, and so a CSRF error will be displayed.
It could be argued that the above is an odd/contrived thing to do, and so displaying a CSRF error here isn't too bad. Fine. But there's another, more subtle, way to trigger the same thing:
Examples for Arduino Nano V3.0.
First, install the Arduino software from arduino.cc as usual, as well as the FTDI driver (if needed for your board). https://github.com/mjoldfield/Arduino-Makefile
You'll need a couple of Perl modules:
Scenario: you already have an app running at http://your.server.com/ and you want to run Sentry at http://your.server.com/sentry/
I spend a few hours banging my head against this, and finally got it to work. There may be a better way, but I couldn't find it.
Warning: hacky.
The Spec ( http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html )
10.4.1 400 Bad Request
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
isometric drawing experiment with three.js
click the shape to enable/disable animation
source code here
import requests | |
key = 'xxxx' # API key copied from https://dabapps.codebasehq.com/settings/profile | |
auth = ('dabapps/j4mie', key) | |
headers = { | |
'Accept': 'application/xml', | |
'Content-type': 'application/xml', | |
} |
import os | |
from django.core.cache.backends.base import BaseCache | |
from django.utils import simplejson as json | |
from django.conf import settings as django_settings | |
from compressor.conf import settings | |
class CompressorManifestCache(BaseCache): | |
"""Proof of concept, do not use""" |