Skip to content

Instantly share code, notes, and snippets.

View glyph's full-sized avatar
💭
extant

Glyph glyph

💭
extant
View GitHub Profile
from __future__ import print_function, unicode_literals
from AppKit import NSUserDefaults
defaults = NSUserDefaults.standardUserDefaults()
nsDictionary = defaults.persistentDomainForName_("com.apple.Terminal")
mutable = dict(nsDictionary)
mutable['Window Settings'] = dict([
(k, dict(v, useOptionAsMetaKey=1))
@glyph
glyph / onlock.py
Created February 12, 2014 23:37
onlock.py
from __future__ import print_function
import os, sys, pipes
import objc
from Foundation import NSObject
from CoreFoundation import (
CFRunLoopRun, CFRunLoopStop, CFFileDescriptorCreate,
CFFileDescriptorCreateRunLoopSource, CFRunLoopAddSource,
@glyph
glyph / gist:9608115
Created March 17, 2014 20:52
created by github.com/tr3buchet/gister
function foo() {
function bar() {
baz
}
}
function bar() {
}
@glyph
glyph / gist:9609180
Created March 17, 2014 21:53
created by github.com/tr3buchet/gister
"""
This module implements Transport Layer Security (TLS) support for Twisted. It
requires U{PyOpenSSL <https://pypi.python.org/pypi/pyOpenSSL>}.
If you wish to establish a TLS connection, please use one of the following
APIs:
- SSL endpoints for L{servers
<twisted.internet.endpoints.SSL4ServerEndpoint>} and L{clients
<twisted.internet.endpoints.SSL4ClientEndpoint>}
@glyph
glyph / gist:66e7219a7268dac19d53
Created May 23, 2014 23:55
created by github.com/tr3buchet/gister
test
@glyph
glyph / gist:4e1d4f1a4f1a6c46dac6
Created May 23, 2014 23:55
created by github.com/tr3buchet/gister
(global-set-key
(kbd "<C-M-268632064>")
(lambda ()
(interactive)
(ns-perform-service
"OmniFocus: Send to Inbox"
(if (region-active-p)
(buffer-substring-no-properties
(point) (mark))
(format "file://%s" (buffer-file-name))))))
@glyph
glyph / gist:954929ba038aceb6237c
Created May 24, 2014 06:36
created by github.com/tr3buchet/gister
2014-05-24 06:36:05+0000 [DNSDatagramProtocol (UDP)] Unhandled Error
Traceback (most recent call last):
File "/srv/names/.virtualenvs/names/site-packages/twisted/internet/defer.py", line 139, in maybeDeferred
result = f(*args, **kw)
File "/srv/names/.virtualenvs/names/site-packages/twisted/names/common.py", line 81, in lookupAddress
return self._lookup(name, dns.IN, dns.A, timeout)
File "/srv/names/.virtualenvs/names/site-packages/twisted/names/resolve.py", line 79, in _lookup
d = self.resolvers[0].query(q, timeout)
File "/srv/names/.virtualenvs/names/site-packages/twisted/names/common.py", line 73, in query
return defer.maybeDeferred(method, query.name.name, timeout)
@glyph
glyph / keybase.md
Created June 30, 2014 19:06
keybase

Keybase proof

I hereby claim:

  • I am glyph on github.
  • I am glyph (https://keybase.io/glyph) on keybase.
  • I have a public key whose fingerprint is 06AB F638 E878 CD29 1264 18AB 7EC2 8125 0FBC 4A07

To claim this, I am signing this object:

# on the injector API
@route("/v1.0/creation", ["POST"])
def inject_create_error(self, request):
"""
"""
params = loads(request.content)
nova_tenant = self.session.data_for_api(self._nova_api)
criteria = params['criteria']
...
{
"endpoints": [
{
"publicURL": "http://localhost:8900/mimicking/MyAPIMock-523f81/ORD/v3/248246335143936",
"region": "ORD",
"tenantId": "248246335143936"
}
],
"name": "TestResource",