Skip to content

Instantly share code, notes, and snippets.

View cablehead's full-sized avatar

Andy Gayton cablehead

View GitHub Profile
@cablehead
cablehead / e.sh
Last active August 26, 2015 07:03
$ levee run -e '
local levee = require("levee")
local h = levee.Hub()
local serve = h.http:listen(8000)
for conn in serve do
h:spawn(function()
local req = conn:recv()
from datetime import datetime
from pprint import pprint as p
job = [
'Job Id : 485195',
'User Name : jyang',
'Group Name : jyang-upg',
'Account Name : PVCMS',
'Queue Name : batch',
watch "
curl -s https://pledge.mayday.us/r/total |
python -c \"
import sys, json, humanize
total = json.loads(sys.stdin.read())['totalCents']
total = (total / 100) - 1000000
print
print humanize.intcomma(total)
\" |
figlet -f banner -r"
+# TODO: Do this for SSL
+class vanilla_socket(socket._socketobject):
+ class __socket(_socket.socket):
+ def __init__(self, hub, *args, **kwargs):
+ self.hub = hub
+ _socket.socket.__init__(self, *args, **kwargs)
+ self.events = self.hub.register_fd(
+ self.fileno(),
+ select.EPOLLIN | select.EPOLLHUP | select.EPOLLERR,
+ )
package snowflake
import (
"log"
"time"
"sync"
)
#!/usr/bin/env python
from suds.client import Client
from suds.wsse import Security
from suds.wsse import UsernameToken
URL = 'https://wd5-impl-services1.workday.com/ccx/service/Human_Resources?wsdl'
USERNAME = '...'
#!/usr/bin/env python
from suds.client import Client
from suds.wsse import Security
from suds.wsse import UsernameToken
URL = 'https://wd5-impl-services1.workday.com/ccx/service/Human_Resources?wsdl'
USERNAME = '...'
#!/usr/bin/env python
from suds.client import Client
from suds.wsse import Security
from suds.wsse import UsernameToken
URL = 'https://wd5-impl-services1.workday.com/ccx/service/osv_uber1/Human_Resources/v22.1?wsdl'
import operator
import select
import fcntl
import os
class EPoll(object):
def __init__(self):
self.q = select.epoll()
@cablehead
cablehead / -
Created January 15, 2015 01:49
foo