I hereby claim:
- I am whiteinge on github.
- I am whiteinge (https://keybase.io/whiteinge) on keybase.
- I have a public key whose fingerprint is 22CA 731F 6E18 4DA6 A087 7EA5 981A 9910 15ED 347D
To claim this, I am signing this object:
| /** | |
| Alternative to Observable.fromCallback that does not complete itself | |
| In the example below `fnThatTakesCallback` is a function that takes a callback | |
| as the final parameter. The function will be invoked with `arg1` and `arg2` and | |
| when the callback is called the values will show up in the observable stream. | |
| If `fnThatTakesCallback` requires a particular context use the call method | |
| e.g., `fromCallbackAll.call(context, fnThatTakesCallback, [...], ...)`. |
| /* eslint no-param-reassign:0 */ | |
| import React from 'react'; | |
| import _ from 'lodash'; | |
| module.exports = h; | |
| var classIdSplit = /([\.#]?[a-zA-Z0-9_:-]+)/; | |
| var notClassId = /^\.|#/; |
| {# Place this file in /srv/reactor/process_status_updates.sls | |
| Call via sending a custom event on a minion as: | |
| salt-call event.send myco/external_task/status_update task=foo status='Update number one!' | |
| Requires reactor config such as: | |
| reactor: | |
| - 'myco/external_task/status_update': | |
| - /srv/reactor/process_status_updates.sls |
| #!/usr/bin/env python3 | |
| ''' | |
| ./streamreader.py 'http://localhost:8000/events?salt_token=078c5f808b077f1e9f8dbc7408420cef' 'http://localhost:8000/events?salt_token=103ba8c5c54c46817a7153038638a9f1' 'http://localhost:8000/events?salt_token=4b12844a06b25411daf5aa0dfdcc7628' | |
| ''' | |
| import asyncio | |
| import json | |
| import sys | |
| import urllib.parse |
| #!/usr/bin/python | |
| ''' | |
| Listen to Salt's event bus for job returns. | |
| Usage:: | |
| ./eventlisten.py 'G@os_family:RedHat' 'test.sleep' '30' | |
| ''' | |
| from __future__ import print_function |
| # Toggle this to test the hook | |
| zstyle ':vcs_info:git:*' get-revision true | |
| # basic 'formats' config: (git)[hash] branch | |
| zstyle ':vcs_info:git*' formats "(%s)%i %b" | |
| # Register new hook | |
| zstyle ':vcs_info:git*+set-message:*' hooks git-optional-rev | |
| # Define new hook |
| #!/bin/sh | |
| URL="http://localhost:8000" | |
| COOKIES="cookies.txt" | |
| fnmatch () { case "$2" in $1) return 0 ;; *) return 1 ;; esac ; } | |
| listen() { | |
| # Watch Salt's events HTTP stream. |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/awk -f | |
| # Output IP addresses for machines that are connected to the local machine. | |
| # | |
| # Usage: | |
| # ./connected_ips.awk /proc/net/tcp | |
| # ./connected_ips.awk -v port=4505 /proc/net/tcp | |
| function fromhex(s){ | |
| # Amazing voodoo from William. | |
| # http://compgroups.net/comp.lang.awk/reading-hexadecimal-numbers/33952 |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| ''' | |
| A minimal but thorough example of a CherryPy app. | |
| ''' | |
| import cherrypy | |
| class Root(object): | |
| @cherrypy.expose | |
| def index(self): |