Skip to content

Instantly share code, notes, and snippets.

Avatar

Enrico doubleo2

View GitHub Profile
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Welcome To Javascript Variables</title>
</head>
<body>
<h1>Welcome to Javascript</h1>
<button>CLICK ME</button>
<p></p>
</body>
View signals.py
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:
View keybase.md

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:

View rfkill-list.txt
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
1: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
@doubleo2
doubleo2 / django1.4-url-samples.html
Created May 21, 2013
Examples of valid url template tags in Django 1.4
View django1.4-url-samples.html
# 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 / RiS-hotlink-dark.html
Created Sep 12, 2012
Rooted in Seattle - Linking
View RiS-hotlink-dark.html
@doubleo2
doubleo2 / playingbasketball-onlinux.py
Created Aug 8, 2012
Google's basketball doodle on Linux
View playingbasketball-onlinux.py
#!/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 / get_secret_key.py
Created Jun 29, 2012
Generate SECRET_KEY for django project
View get_secret_key.py
from django.utils.crypto import get_random_string
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
get_random_string(50, chars)
@doubleo2
doubleo2 / config
Created Nov 24, 2011
Solarized palette for Terminator terminal emulator
View config
# 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]]