Skip to content

Instantly share code, notes, and snippets.

@zefciu
zefciu / gist:1858832
Created February 18, 2012 11:15
No such savepoint
-------------------- >> begin captured logging << --------------------
eplasty.queries.sql: INFO: SAVEPOINT clean;
eplasty.queries.sql: INFO: SAVEPOINT clean;
eplasty.queries.sql: INFO: SAVEPOINT clean;
eplasty.queries.sql: INFO: SAVEPOINT clean;
eplasty.queries.sql: INFO: SAVEPOINT clean;
eplasty.queries.sql: INFO: SAVEPOINT clean;
eplasty.queries.sql: INFO: SAVEPOINT clean;
eplasty.queries.sql: INFO: SAVEPOINT clean;
eplasty.queries.sql: INFO: SAVEPOINT clean;
@zefciu
zefciu / gist:5934496
Created July 5, 2013 13:23
A way to test sys.exit with mocks
import sys
import unittest
import mock
@mock.patch('sys.exit')
class Test(unittest.TestCase):
def test_ok(self, exit):
sys.exit(-1)
sys.exit.assert_called_with(-1)
class Ozwmorde(BaseException):
"""O zesz w morde!"""
class Okurwa():
@property
def japierdole(self):
raise Ozwmorde()
if __name__ == '__main__':
print(hasattr(Okurwa(), 'japierdole'))
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-linux-gnu"
declare ccc i8* @memcpy(i8*, i8*, i64)
declare ccc i8* @memmove(i8*, i8*, i64)
declare ccc i8* @memset(i8*, i64, i64)
declare ccc i64 @newSpark(i8*, i8*)
@zefciu
zefciu / keybase.md
Created February 6, 2016 07:41
keybase.md

Keybase proof

I hereby claim:

  • I am zefciu on github.
  • I am zefciu (https://keybase.io/zefciu) on keybase.
  • I have a public key whose fingerprint is 7ECC 06A4 4B6E 1F13 6EE9 54E4 1A08 CFAB D9A0 1061

To claim this, I am signing this object: