Skip to content

Instantly share code, notes, and snippets.

Kristian Glass doismellburning

Block or report user

Report or block doismellburning

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View olc.h
/*
* The version info. Please use this info when reporting bugs.
* It is displayed in the game by typing 'version' while editing.
* Do not remove these from the code - by request of Jason Dinkel
*/
#define VERSION "ILAB Online Creation [Beta 1.0, ROM 2.3 modified]\n\r Port a ROM 2.4 v1.00\n\r"
#define AUTHOR " By Jason(jdinkel@mines.colorado.edu)\n\r Modified for use with ROM 2.3\n\r By Hans Birkeland (hansbi@ifi.uio.no)\n\r Modificado para uso en ROM 2.4b4a\n\r Por Birdie (itoledo@ramses.centic.utem.cl)\n\r"
#define DATE " (Apr. 7, 1995 - ROM mod, Apr 16, 1995)\n\r (Port a ROM 2.4 - Nov 2, 1996)\n\r Version actual : 1.5a - Mar 9, 1997\n\r"
#define CREDITS " Original by Surreality(cxw197@psu.edu) and Locke(locke@lm.com)"
View pyqt.md

I know installing packages from both apt and pip can be ick but any tips on troubleshooting this please:

[2018-04-03T18:59:54+0000 pi@raspberrypi ~] $ sudo apt-get install python3-pyqt5
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pyqt5 is already the newest version (5.7+dfsg-5).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
@doismellburning
doismellburning / out.txt
Last active Jan 4, 2017
Django TestClient sessions - what am I missing...?
View out.txt
======================================================================
FAIL: test_clear_token_with_token (article.tests.test_views.ArticleViewsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/root/article/tests/test_views.py", line 92, in test_clear_token_with_token
self.assertIsNotNone(self.client.session.get('token'))
AssertionError: unexpectedly None
----------------------------------------------------------------------
@doismellburning
doismellburning / settings.py
Created Dec 20, 2016
Running Django on EC2? Use this if you need your instance's IP in `ALLOWED_HOSTS`
View settings.py
try: # pragma: no cover
# From http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
_local_ip = requests.get(
'http://169.254.169.254/latest/meta-data/local-ipv4',
timeout=0.1,
).text
ALLOWED_HOSTS.append(_local_ip)
except requests.exceptions.RequestException:
pass
View cd iac.md

I'm really interested in how y'all are doing Continuous Integration/Deployment of your Infrastructure-as-Code (particularly CloudFormation), especially without disruption to users!

Specifically, I'm trying to automate a "manual CloudFormation setup". Right now that's "templates in git with humans periodically run update-stack"; ideally it would become "PR merged? Rolling out the change".

(Part of me feels like I have "too many questions" and really just need to see a working setup, but hey)

@doismellburning
doismellburning / create_superuser.py
Created Jun 14, 2016
Non-interactively create/set a Django superuser
View create_superuser.py
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth import get_user_model
from django.conf import settings
from django.db import transaction
class Command(BaseCommand):
View auto-setup.sh
# Excerpt
INT=$(iwconfig 2> /dev/null | grep -v "^ " | awk '{print $1}' | head -1 | egrep "^[a-z]")
if [ $? -eq 0 ]
then
echo "Removing Existing interface ${INT}"
ifconfig ${INT} down
iw dev ${INT} del
fi
sleep 1
View autolink.patch
@doismellburning
doismellburning / userstories.md
Last active Oct 30, 2017
Conference User Stories
View userstories.md
View anchor.patch
commit d2a403c85ef68c4119de9208c15e9c4dc5df9b9b
Author: Kristian Glass <git@doismellburning.co.uk>
Date: Fri Oct 31 00:36:56 2014 +0000
Magic anchor links
With thanks to http://ben.balter.com/2014/03/13/pages-anchor-links/
diff --git a/_config.yml b/_config.yml
index 1b00c31..ad61734 100644
You can’t perform that action at this time.