Skip to content

Instantly share code, notes, and snippets.

View boojums's full-sized avatar

Cristina Luis boojums

View GitHub Profile

Keybase proof

I hereby claim:

  • I am boojums on github.
  • I am cristinaluis (https://keybase.io/cristinaluis) on keybase.
  • I have a public key ASAPr1kSzZZaJjnW47bcHhZraMchIBD3U4dSaG46d6zzlwo

To claim this, I am signing this object:

@boojums
boojums / timezones_suck.py
Last active December 10, 2015 08:40
Quick demo of dealing with timestamps and timezones, which suck.
from calendar import timegm
import datetime
from django.utils.timezone import make_aware
import pytz
# Roundtrip a datetime to a timestamp (epoch, seconds) and back again
date = datetime.datetime(2015, 10, 25, 2)
timestamp = timegm(date.timetuple())
>>> 1445738400
@boojums
boojums / Sublime Text 3 Linux Shortcuts.textile
Last active May 3, 2018 13:30 — forked from lucasfais/gist:1207002
Sublime Text 3 - Linux shortcuts

Sublime Text 3 – Useful Shortcuts (Linux, Norwegian keyboard)

I changed a few of the key mappings to work with a Norwegian layout:

{ “keys”: [“ctrl+\\”], “command”: “show_panel”, “args”: {"panel": “console”, “toggle”: true} },
{ “keys”: [“ctrl+7”], “command”: “toggle_comment”, “args”: { “block”: false } },
{ “keys”: [“ctrl+9”], “command”: “indent” },
{ “keys”: [“ctrl+8”], “command”: “unindent” },

And installed the package Emmet, which is what provides some of the functions here.