Skip to content

Instantly share code, notes, and snippets.

View radiosilence's full-sized avatar
🔥

James Cleveland radiosilence

🔥
View GitHub Profile
SELECT
concerts.id as id,
concerts.title as title,
concerts.summary as summary,
concerts.s_programme as programme,
concerts.booking_url as booking_url,
DATE_FORMAT(concerts.dt, '%W %D %M, %Y') as date,
DATE_FORMAT(concerts.dt, '%l.%i%p') as time,
GROUP_CONCAT(DISTINCT CONCAT_WS(' ', composers.firstname, composers.lastname)) as composers,
GROUP_CONCAT(DISTINCT pieces.piece) as pieces,
@radiosilence
radiosilence / gist:5891672
Created June 29, 2013 16:01
Xresources for urxvt
!URxvt.font: -*-unifont-medium-*-*-*-16-*-*-*-*-*-*-*
!URxvt.boldFont: -*-unifont-medium-*-*-*-16-*-*-*-*-*-*-*
! Terminus
!URxvt.font: -*-terminus-medium-*-*-*-16-*-*-*-*-*-iso10646-*
!URxvt.boldFont: -*-terminus-bold-*-*-*-16-*-*-*-*-*-iso10646-*
! Tamzen
URxvt.font: -misc-tamzen-medium-r-normal--17-*-*-*-*-*-iso8859-1
URxvt.boldFont: -misc-tamzen-bold-r-normal--17-*-*-*-*-*-iso8859-1
! Source Sans
!URxvt.font: xft:Source Code Pro:size=7
@radiosilence
radiosilence / gist:5891669
Created June 29, 2013 16:01
Xresources for xterm
xterm*font: -misc-tamzen-medium-r-normal--17-*-*-*-*-*-iso8859-1
xterm*boldFont: -misc-tamzen-bold-r-normal--17-*-*-*-*-*-iso8859-1
*foreground: rgb:ff/ff/ff
*background: rgb:0E/0E/0E
*color0: rgb:20/0a/04
*color1: rgb:a0/46/77
*color2: rgb:a0/6f/7c
*color3: rgb:EF/B1/69
*color4: rgb:49/2d/a0
*color5: rgb:68/5d/a0
try:
import threading
currentThread = threading.currentThread
except ImportError:
def currentThread():
return "no threading"
_sites = {}
def set_site(site):
@radiosilence
radiosilence / gist:5764790
Created June 12, 2013 12:22
A simple script to run via cron to make sure a process is running.
#!/bin/bash
VENV=/home/greencall/webapps/greencall
do_check () {
if ps ux | grep -v grep | grep "$1" > /dev/null
then
exit
else
echo "Restarted with command $1"
$1

Person of Interest Was Wrong

If the existence of "The Machine" was made known, there would simply be a giant media coverup and people would go back to their superbowl or what the fuck ever.

The PRISM thing is just so depressing because not only does it seem that the state is far more encroached than expected, but also that the population are so satiated with bullshit that it feels totally and utterly hopeless to change things for the better. How is there any hope for sorting things out when people are so utterly and vastly entrenched in their ignorance?

The government has too much power. Far, far far too much. How can we be free when a slip of the tongue on twitter or a stupid joke or wearing a mask or standing up for what we believe in is enough to trigger a knock at the door or being thrown in jail or community service? I expect there'll be a point where we can't even say shit like this. How far does it have to creep?

I think the thing is, PRISM makes me just feel...violated

@radiosilence
radiosilence / gist:5714387
Last active December 1, 2023 15:17
Example uWSGi INI file with support for celery.
[uwsgi]
disable-logging = True
socket = /srv/qrs/test/wsgi.sock
chdir = /srv/qrs/test
chmod = 660
master = true
processes = 2
module = qrs.wsgi:application
virtualenv = /env/qrs/test
enable-threads = true
@radiosilence
radiosilence / gist:5635766
Last active December 17, 2015 15:59
A Debian init script for uWSGI
#!/usr/bin/env bash
### BEGIN INIT INFO
# Provides: uwsgi
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the uwsgi app server
# Description: starts uwsgi app server using start-stop-daemon
import datetime
total = 900
blocks = [(datetime.datetime(*start), datetime.datetime(*end), q) for start, end, q in [
((2012,01,02,8,00), (2012,01,10,10,32), 3),
((2012,01,02,8,00), (2012,01,10,10,32), 3),
((2012,01,01,8,00), (2012,01,12,10,32), 1),
((2012,01,02,8,00), (2012,01,10,10,32), 3),
((2012,01,02,8,00), (2012,01,10,10,32), 3),
class Account(object):
address1 = '1 Potato Street'
billing_address1 = None
name = 'John Doe'
billing_name = 'Jane Doe'
@property
def billing(self):
account = self
class c: