Skip to content

Instantly share code, notes, and snippets.

@doubleo2
doubleo2 / config
Created November 24, 2011 05:26
Solarized palette for Terminator terminal emulator
# Save this file as config (no extension)
# in the ~/.config/terminator/ folder
# if it already exists, copy and paste palette,
# foreground_color and background_color into the
# profile section of your choosing.
[global_config]
[keybindings]
[profiles]
[[default]]
@doubleo2
doubleo2 / get_secret_key.py
Created June 29, 2012 07:49
Generate SECRET_KEY for django project
from django.utils.crypto import get_random_string
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
get_random_string(50, chars)
@doubleo2
doubleo2 / playingbasketball-onlinux.py
Created August 8, 2012 19:55
Google's basketball doodle on Linux
#!/usr/bin/env python
# Based on code from
# pykey -- a Python version of crikey,
# http://shallowsky.com/software/crikey
# Simulate keypresses under X11.
# and
# https://gist.github.com/3295480
#
# Portions of this software are copyright 2008 by Akkana Peck.
@doubleo2
doubleo2 / RiS-hotlink-dark.html
Created September 12, 2012 06:13
Rooted in Seattle - Linking
@doubleo2
doubleo2 / django1.4-url-samples.html
Created May 21, 2013 23:29
Examples of valid url template tags in Django 1.4
# Standard 1.4 urls
{% url path.to.some_view v1 v2 %}
{% url path.to.some_view arg1=v1 arg2=v2 %}
{% url app_views.client client.id %}
{% url path.to.view arg arg2 as the_url %}
{% url path.to.view as the_url %}
# Namespaced 1.4 urls
{% url myapp:view-name %}
{% url myapp:path.to.some_view v1 v2 %}
@doubleo2
doubleo2 / rfkill-list.txt
Last active December 18, 2015 01:09
tlp info
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
1: hci0: Bluetooth
Soft blocked: no
Hard blocked: no

Keybase proof

I hereby claim:

  • I am doubleo2 on github.
  • I am enrico (https://keybase.io/enrico) on keybase.
  • I have a public key whose fingerprint is B537 BF85 4F86 794B 6FCC 0CC9 6C91 01D3 015C 34D2

To claim this, I am signing this object:

from django.db import transaction
from django.db.models.signals import post_save
from django.dispatch import receiver
from .models import ActionLogEntry
from .models import EventLogEntry
@receiver(post_save, sender=ActionLogEntry, dispatch_uid="event_logger")
def log_action_event(sender, instance, **kwargs):
try:
<!DOCTYPE html>
<html>
<head>
<title>Welcome To Javascript Variables</title>
</head>
<body>
<h1>Welcome to Javascript</h1>
<button>CLICK ME</button>
<p></p>
</body>