Skip to content

Instantly share code, notes, and snippets.

View qpfiffer's full-sized avatar
🔚

Quinlan Pfiffer qpfiffer

🔚
View GitHub Profile
λ:~/src/Project-Oleg curl -X POST -H "Content-Type: application/json" -d '{"url": "data", "person":"alkjsdDecember"}' http://localhost:8080/t
MUDADA
(master)
λ:~/src/Project-Oleg curl localhost:8080/t
{"url": "data", "person":"alkjsdDecember"}(master)
λ:~/src/Project-Oleg curl localhost:8080/taljks
These aren't your ghosts.
(master)
λ:~/src/Project-Oleg
@qpfiffer
qpfiffer / curl.txt
Created January 7, 2014 03:26
Weird stuff from reddit
(feature/server)
λ:~/src/project-oleg curl -I http://www.reddit.com/r/asldkfjkdjflklkdjsld
HTTP/1.1 302 Moved Temporarily
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Location: http://www.reddit.com/subreddits/search?q=asldkfjkdjflklkdjsld
Server: '; DROP TABLE servertypes; --
Vary: Accept-Encoding
Date: Tue, 07 Jan 2014 03:26:16 GMT
Connection: keep-alive
In [1]: [r.save_related() for r in Response.objects.filter(question__slug__in=['survey-site', 'vendor', 'buy-or-catch', 'how-sold'])]
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-68728f953d01> in <module>()
----> 1 [r.save_related() for r in Response.objects.filter(question__slug__in=['survey-site', 'vendor', 'buy-or-catch', 'how-sold'])]
/vagrant/server/apps/survey/models.pyc in save_related(self)
538 .update(**{question_slug: self.answer}))
539 setattr(self.respondant, question_slug, self.answer)
--> 540 self.respondant.update_csv_row()
@qpfiffer
qpfiffer / 10-synaptics.conf
Created December 11, 2013 04:45
Synaptics config, I think.
Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Option "TapButton1" "1"
Option "TapButton2" "2"
Option "TapButton3" "3"
Option "VertEdgeScroll" "on"
Option "VertTwoFingerScroll" "on"
series: [{"data": [[1385269200000, 2], [1385355600000, 1], [1385442000000, 3], [1385528400000, 9], [1385614800000, 2], [1385701200000, 1], [1385874000000, 1], [1385960400000, 2], [1386046800000, 2]], "name": "dx"}, {"data": [[1385528400000, 1], [1385614800000, 1]], "name": "Nano"}, {"data": [[1385874000000, 5]], "name": "Fridge"}, {"data": [[1385787600000, 2], [1385874000000, 17], [1385960400000, 4], [1386046800000, 2]], "name": "orihaus"}, {"data": [[1385269200000, 7], [1385355600000, 3], [1385442000000, 5], [1385528400000, 2], [1385614800000, 5], [1385787600000, 3], [1385960400000, 1], [1386046800000, 1]], "name": "Tyen"}, {"data": [[1385269200000, 1], [1385874000000, 1]], "name": "Xyz_39808"}, {"data": [[1385960400000, 1]], "name": "Jenoki"}, {"data": [[1385269200000, 18], [1385355600000, 9]], "name": "th3_pu377ca_"}, {"data": [[1385269200000, 1], [1385355600000, 1], [1385528400000, 2], [1385614800000, 2]], "name": "_creo"}, {"data": [[1385701200000, 2]], "name": "the_pussycat^^_"}, {"data": [[138561480000
@qpfiffer
qpfiffer / backup-log-purge.py
Created December 3, 2013 22:32
@nijotz backup log purging script
#!/usr/bin/env python
import calendar
import os
import re
import time
from datetime import datetime
def in_purge_window(base, target, now=time.time()):
'''
create trigger fsm_state_events after insert or update or delete on fsm.state for each row execute procedure event.evented();
create trigger fsm_transition_events after insert or update or delete on fsm.transition for each row execute procedure event.evented();
I'd just like to interject for one moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.
Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called "Linux", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.
There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in t
@qpfiffer
qpfiffer / huehuehue.js
Created October 4, 2013 18:44
ASYNCHRONOUS GODS, HEAR MY CALL
table.columns().result(
function(columns) {
var field_to_column = {};
var self = this;
var one_big_promise = _.reduce(columns, function(accum, column) {
return accum.done(function(thing) {
var relevant_field = _.find(fields, function(x) { return x == column.name; });
accum.done(function(panic) {
server {
error_log /var/log/nginx/shithouse_error.log;
access_log /var/log/nginx/shithouse_access.log;
listen 80;
server_name 3am.shithouse.tv;
location / { try_files $uri @3am; }
location @3am {
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/app/3am/socket;