Skip to content

Instantly share code, notes, and snippets.

Ian Eure ieure

Block or report user

Report or block ieure

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View whoops.org
.|'''''|        ||    '||  ||`          '||     
|| .      ''    ||     ||  ||            ||     
|| |''||  ||  ''||''   ||''||  '||  ||`  ||''|, 
||    ||  ||    ||     ||  ||   ||  ||   ||  || 
`|....|' .||.   `|..' .||  ||.  `|..'|. .||..|' 
View fun-with-postgres
lmao=# CREATE TABLE "DELETE * FROM users" ("TRUNCATE TABLE" TEXT NOT NULL, "DROP DATABASE" TEXT NOT NULL);
lmao=# INSERT INTO "DELETE * FROM users" ("TRUNCATE TABLE", "DROP DATABASE") VALUES ('lol', 'wtf');
lmao=# SELECT * FROM "DELETE * FROM users";
TRUNCATE TABLE | DROP DATABASE
----------------+---------------
lol | wtf
(1 row)
lmao=#
View killme.scala
// kill me
class KillMeWith[W <: Weapon] extends Death {
View sql.el
(defun sql-connect* (connection &optional new-name)
(interactive
(list (sql-read-connection "Connection: " nil '(nil))
current-prefix-arg)
nil)
(require 'tramp)
(let ((dir (cadr (assoc 'default-directory
(cdr (assoc connection sql-connection-alist))))))
(if dir
(let ((default-directory dir))
View gist:66d73d60ae085be91109
fermion!ieure:/tmp/hamms$ pip install hamms
Downloading/unpacking hamms
Downloading hamms-1.3.tar.gz
Running setup.py egg_info for package hamms
Downloading/unpacking flask (from hamms)
Downloading Flask-0.10.1.tar.gz (544kB): 544kB downloaded
Running setup.py egg_info for package flask
warning: no files found matching '*' under directory 'tests'
View gist:9f32c1037e1ff74e2ca7
I showed Tim around. Ordination certificates. Membership cards. Nearly
completed mechanicals for the cover of the Neo-American Church
Catechism and Handbook. Michael had just done his original drawing of
The Great Seal, showing a three-eyed toad with the motto “Victory Over
Horseshit” below it, and Wendy was whiting out ink spots and smudges.
“I don’t like your motto, Art,” Tim said, looking over her
shoulder. “Victory? Over? Horseshit?”
“What’s wrong with that?” I asked.
View gist:782495cc5a4b954565ad
<SchemaCzar> CHALLENGE QUESTION: what is the precision of a timestamp without time zone ?
<ieure> SchemaCzar, Nanoseconds.
<ieure> SchemaCzar, I know this because JVM timestamps only support milliseconds. So if you have a psql TS column and move that data into the JVM, you lose precision.
<ieure> And this caused Bugs
<SchemaCzar> and I'm trying to use that point to convince my team to convert from timestamp with no time zone to timestamp with time zone
<ieure> SchemaCzar, You're the fucking Schema Czar. Just change it.
@ieure
ieure / tiling
Created Mar 17, 2009
Code to handle centering and tiling of Emacs frames
View tiling
;; Functions to work with frames
(provide 'ime-frame)
(defun screen-usable-height (&optional display)
"Return the usable height of the display.
Some window-systems have portions of the screen which Emacs
cannot address. This function should return the height of the
screen, minus anything which is not usable."
View gist:141615
ieure!neutron:~/Projects/Cassandra$ nosetests
EEEEEEEEFEFEFEFEFEFEFEFEEFEFEFEFEFEFE
======================================================================
ERROR: system.test_server.TestMutations.test_bad_calls
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/local/lib/python2.5/site-packages/nose/case.py", line 366, in tearDown
try_run(self.inst, ('teardown', 'tearDown'))
File "/opt/local/lib/python2.5/site-packages/nose/util.py", line 453, in try_run
return func()
View gist:141649
ieure!neutron:~/Projects/Cassandra$ sh -x bin/cassandra -p cassandra.pid
+ '[' x = x ']'
++ dirname bin/cassandra
+ for include in /usr/share/cassandra/cassandra.in.sh /usr/local/share/cassandra/cassandra.in.sh /opt/cassandra/cassandra.in.sh '`dirname $0`/cassandra.in.sh'
+ '[' -r /usr/share/cassandra/cassandra.in.sh ']'
+ for include in /usr/share/cassandra/cassandra.in.sh /usr/local/share/cassandra/cassandra.in.sh /opt/cassandra/cassandra.in.sh '`dirname $0`/cassandra.in.sh'
+ '[' -r /usr/local/share/cassandra/cassandra.in.sh ']'
+ for include in /usr/share/cassandra/cassandra.in.sh /usr/local/share/cassandra/cassandra.in.sh /opt/cassandra/cassandra.in.sh '`dirname $0`/cassandra.in.sh'
+ '[' -r /opt/cassandra/cassandra.in.sh ']'
+ for include in /usr/share/cassandra/cassandra.in.sh /usr/local/share/cassandra/cassandra.in.sh /opt/cassandra/cassandra.in.sh '`dirname $0`/cassandra.in.sh'
You can’t perform that action at this time.