Skip to content

Instantly share code, notes, and snippets.

View queertypes's full-sized avatar

Allele Dev queertypes

  • Georgia, USA
View GitHub Profile
@queertypes
queertypes / Link.hs
Created August 27, 2015 03:51
Link Relations, in Haskell
@queertypes
queertypes / supervisor.conf
Created January 31, 2014 18:43
supervisor sample conf.
[supervisord]
[inet_http_server]
port=9001
;username=me
;password=something
[program:sleep]
command=./sleep.py
In [1]: from marconi.queues.storage.sqlite import driver
In [2]: from marconi.openstack.common.cache import cache
In [3]: from oslo.config import cfg
In [4]: sqlite_driver = driver.DataDriver(cfg.ConfigOpts(), cache.get_cache())
In [5]: queue_controller = sqlite_driver.queue_controller
@queertypes
queertypes / marconi-analyze
Created February 14, 2014 18:56
Extract tenants from marconi installation
#!/usr/bin/env python
from __future__ import print_function
import sys
import pymongo
def connection(uri):
if uri and 'replicaSet' in uri:
MongoClient = pymongo.MongoReplicaSetClient
@queertypes
queertypes / compress.hs
Created February 21, 2014 18:30
Rread file at path, compress, write to path.gz
{-# LANGUAGE OverloadedStrings #-}
import System.Environment (getArgs)
import qualified Codec.Compression.GZip as GZ (compress)
import qualified Data.ByteString.Lazy as LB
main :: IO ()
main = do
-- Get arguments - a path; lift the pure operation 'head' into the IO context
path <- fmap head getArgs
@queertypes
queertypes / rate_test.py
Created March 7, 2014 16:02
Test against eom:governor
# rate_test.py
# usage: python test_rate.py <count> <url> <auth_token>
# reqs: pip install grequests
from __future__ import print_function
import grequests
import itertools
import requests
import sys
alejandro@rainbow-generator:~:$ for i in {1..5}; do time python rate_test.py 90 https://test.queues.api.rackspacecloud.com/v1/queues <redacted>; done
<Response [204]>
{'429': 0, '200': 0, 'other': 0, '204': 90}
real 0m1.852s
user 0m1.300s
sys 0m0.133s
<Response [204]>
{'429': 0, '200': 0, 'other': 0, '204': 90}
from __future__ import print_function
import grequests
import itertools
import requests
import sys
if __name__ == '__main__':
if len(sys.argv) < 4:
@queertypes
queertypes / lambda-jam-fp-advocate.md
Created April 14, 2014 18:12
Positive Advocacy for Functional Programming

Core message:

We're here because we're passionate about functional programming: Clojure, Haskell, Erlang, Scala, F#, Idris, and others. We've seen the benefits, we know why it works, and we want to spread what we've learned. I'm proposing to speak about how to advocate for functional programming while respecting the human element. By the end of this talk, you'll have learned:

  1. Why the human aspect is important to consider
  2. Advocacy anti-patterns: be aware and how to avoid them
  3. How to share what you love with positivity in mind

This talk targets advocacy on the group/individual level more than uptake in enterprise settings. Much of the advice remains applicable in that context, however.

@queertypes
queertypes / positive-advocacy.txt
Created April 15, 2014 17:27
Positive Advocacy for Functional Programming
Pre-reqs: an open mind
# Core message
We're here because we're passionate about functional programming: Clojure, Haskell, Erlang, Scala, F#, Idris, and others. We've seen the benefits, we know why it works, and we want to spread what we've learned. I'm proposing to speak about how to advocate for functional programming while respecting the human element. By the end of this talk, I aim to share with you:
1. Why the human aspect is important to consider
2. Advocacy anti-patterns: awareness and improving communication
3. How to share what you love with positivity in mind