Skip to content

Instantly share code, notes, and snippets.

View javiertejero's full-sized avatar

Javier Tejero javiertejero

  • TravelPerk
  • Barcelona, Spain
View GitHub Profile
@javiertejero
javiertejero / keybase.md
Created October 1, 2014 14:41
Proving my GitHub identity with keybase

Keybase proof

I hereby claim:

  • I am javiertejero on github.
  • I am javiertejero (https://keybase.io/javiertejero) on keybase.
  • I have a public key whose fingerprint is 02EC 3D3D 4F7F B08A F668 06FE 85FE DA01 CF4B F960

To claim this, I am signing this object:

@javiertejero
javiertejero / dabblet.css
Created April 18, 2013 08:46
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(175deg, red, yellow);
height: 12px;

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

class ReloaderEventHandler(FileSystemEventHandler):
"""
Listen for changes to modules within the Django project
On change, reload the module in the Python Shell
Custom logic required to reload django models.py modules
Due to the singleton AppCache, which caches model references.
For those models files, we must clear and repopulate the AppCache
"""
def __init__(self, *args, **kwargs):
#
# templatetags/kwacros.py - Support for macros in Django templates
#
# Based on snippet by
# Author: Michal Ludvig <[email protected]>
# http://www.logix.cz/michal
#
# modified for args and kwargs by Skylar Saveland http://skyl.org
#
@javiertejero
javiertejero / hl.py
Created October 29, 2012 09:32 — forked from dshafik/hl.py
CLI syntax highlighter
#!/usr/bin/env python
"""
GistID: 3972600
(this lives in the cloud at github gist:3972600/hl.py)
Highlight stdin using pygments and output to stdout
Auto-detects the input language.
Will not colorize if piped into something else.