Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am dspruell on github.
  • I am dspruell (https://keybase.io/dspruell) on keybase.
  • I have a public key ASAHC8xcOBpj08CZa9W-RlZC4X_B3OQ6-RNRxBbmOVl0two

To claim this, I am signing this object:

@dspruell
dspruell / test.py
Created July 1, 2022 05:49
Test Stream.to_mqtt
import time
from streamz import Stream
def run():
source = Stream.from_mqtt(
"localhost",
1883,
"topic/logpipe_in",
@dspruell
dspruell / gist:d9756de9339182ffe54ecb9f7ef654e4
Created June 14, 2018 21:49
fluent-bit build failure on OpenBSD 6.3
$ cd fluent-bit-0.13.3/build/
$ cmake .. && gmake
-- The C compiler identification is Clang 5.0.1
-- The CXX compiler identification is Clang 5.0.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
@dspruell
dspruell / gist:d12506b7332789f726ba487636b36c74
Created June 10, 2016 00:23
Filter idea - quote_each - surround array members in quotes
def quote_each(data, type='double'):
'''
Take a list of strings and output the list with each item surrounded by
quotation marks. Defaults to using double quotes ("item"), may be specified
instead to use single quotes ('item').
'''
QUOTE_TYPES = {
'double': '"',
'single': "'",
@dspruell
dspruell / gist:b3041e89d2745756b67b
Created May 20, 2015 22:27
Mobile scareware landing page
URL: http://play.google.com.store.apps.increaseandroidmemory.com/en/details/index.html?browser_type=KHTML&dualoffer=false&hl=en
HTTP/1.1 200 OK
Date: Fri, 15 May 2015 04:35:55 GMT
Server: Apache/2.2.29 (Unix) mod_ssl/2.2.29 OpenSSL/1.0.1e-fips mod_bwlimited/1.4
Last-Modified: Fri, 08 May 2015 02:44:34 GMT
ETag: "15400aa-222b-5158902298cce"
Accept-Ranges: bytes
Content-Length: 8747
Connection: close
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/fubar/venv.d/django-tidb/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/Users/fubar/venv.d/django-tidb/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/fubar/venv.d/django-tidb/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/fubar/venv.d/django-tidb/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/fubar/venv.d/django-tidb/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/Users/fubar/venv.d/django-tidb/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/fubar/venv.d/django-tidb/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/fubar/venv.d/django-tidb/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
$ python manage.py buildwatson
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/fubar/venv.d/django-tidb/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/Users/fubar/venv.d/django-tidb/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/fubar/venv.d/django-tidb/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)