Skip to content

Instantly share code, notes, and snippets.

@dlobue
dlobue / dimwishlist.txt
Last active May 23, 2022 18:33
dimwishlist
title:dominic's wishlist
dimwishlist:item=3654674561&perks=3250034553,1885400500,588594999,4259401308
dimwishlist:item=3654674561&perks=3250034553,1885400500,1168162263,4259401308
dimwishlist:item=3654674561&perks=3250034553,1885400500,1546637391,4259401308
dimwishlist:item=310708513&perks=1467527085,1885400500,247725512,3592538738
dimwishlist:item=310708513&perks=1467527085,1885400500,247725512,4049631843
dimwishlist:item=2888266564&perks=202670084,1885400500,1645158859,2846385770
dimwishlist:item=2888266564&perks=1482024992,1885400500,1645158859,957782887
dimwishlist:item=294129361&perks=202670084,1885400500,1583705720,4049631843
@dlobue
dlobue / dbhist.sh
Created March 14, 2018 19:25 — forked from outcoldman/dbhist.sh
DBHist: bash history in sqlite
# The MIT License
# SPDX short identifier: MIT
# Further resources on the MIT License
# Copyright 2017 Denis Gladkikh (https://www.outcoldman.com/en/archive/2017/07/19/dbhist/)
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

Keybase proof

I hereby claim:

  • I am dlobue on github.
  • I am dominiclobue (https://keybase.io/dominiclobue) on keybase.
  • I have a public key ASDXUTnQOdFahckIpTPp8oTButbV5PZ_4vWQ4DV-Vnqhtwo

To claim this, I am signing this object:

from argparse import ArgumentParser
from urlparse import urlparse
import boto
def get_temp_url(bucket, key, expires_in, upload):
s3conn = boto.connect_s3()
bucket = s3conn.get_bucket(bucket)
key = bucket.get_key(key, validate=False)
url = key.generate_url(expires_in, method='PUT' if upload else 'GET')
@dlobue
dlobue / epoch.py
Created September 18, 2015 20:08
python epoch cheatsheat
>>> import datetime
>>> # replace datetime.datetime.now() with your datetime object
>>> int(datetime.datetime.now().strftime("%s"))
1312908481
>>> int(datetime.datetime.utcnow().strftime("%s"))
1312908481
@dlobue
dlobue / externs_screeps.js
Created August 23, 2015 14:40
clojurescript screeps config
// externs/screeps.js
var ConstructionSite = function () { };
ConstructionSite.prototype = {
id: "",
owner: null,
room: null,
pos: null,
progress: 0,
@dlobue
dlobue / local_settings.py
Created August 13, 2015 21:55
disable migrations
from frontend.settings.dev import *
class DisableMigrations(object):
def __contains__(self, item):
return True
def __getitem__(self, item):
return "notmigrations"
@dlobue
dlobue / linkies
Last active March 18, 2016 21:54
algorithms data structures and bigO
references for learning more about algorithms, data structures, and bigO, and type systems, and compiler implementations
http://bigocheatsheet.com/
http://visualgo.net/
http://algoviz.org/
http://hypirion.com/musings/understanding-persistent-vector-pt-1
http://hypirion.com/musings/understanding-persistent-vector-pt-2
http://hypirion.com/musings/understanding-persistent-vector-pt-3
https://github.com/felipernb/algorithms.js
http://algorithmsjs.org/
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f42e561bf9e, pid=32703, tid=139887496181504
#
# JRE version: Java(TM) SE Runtime Environment (7.0_71-b14) (build 1.7.0_71-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.71-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# J 2622 C2 org.apache.cassandra.io.compress.CompressedThrottledReader.reBuffer()V (17 bytes) @ 0x00007f42e561bf9e [0x00007f42e561bee0+0xbe]
#
@dlobue
dlobue / regex_rosetta.txt
Created January 8, 2015 22:21
regex rosetta stone
sed:
grouping- \( \)
backreference- \1 \2 \3
low,high- {x,y}
one or more- \+
or- \|
class match- [abc123]
eol- $
awk: