I hereby claim:
- I am jgrgt on github.
- I am jensgeiregat (https://keybase.io/jensgeiregat) on keybase.
- I have a public key whose fingerprint is 0E60 1C75 4EAE 8991 7293 839C F40A 1ED9 AC49 6619
To claim this, I am signing this object:
substitutions: | |
device_name: 'Digoo Station' | |
external_location: 'Balcony' | |
rf_receiver_pin: '4' | |
digoo_sensor_channel: '2' | |
digoo_sensor_id: '9' | |
esphome: | |
name: digoo-station | |
comment: 'ESP station for environment monitoring' |
/** | |
* Publishing this publicly because it took me so long to get to this stage: | |
* - Using a memory-mapped byte buffer because I will handle *large* files. | |
* - Not too happy with the end of my loop, but I could not find how to check for the end of the buffer otherwise. | |
*/ | |
import org.bson.BsonBinaryReader | |
import org.bson.BsonReader | |
import org.bson.Document | |
import org.bson.codecs.DecoderContext | |
import org.bson.codecs.DocumentCodec |
@Grab('com.netflix.rxjava:rxjava-joins:0.19.6') | |
import rx.Observable | |
import rx.functions.Func1 | |
import rx.functions.Action1 | |
import java.util.concurrent.TimeUnit | |
def range = new IntRange(5, 0) | |
range.each { println it} |
{ | |
"devDependencies": { | |
"connect": "~3.3.4", | |
"proxy-middleware": "~0.11.0", | |
"url": "~0.10.3", | |
"http": "0.0.0" | |
}, | |
"scripts": { | |
"start": "node server.js" | |
} |
class DefaultXConnector { | |
// ... | |
@Override | |
rx.Observable<JsonObject> getSessionWithTimeout(JsonObject jsonObject, long timeout) { | |
log.debug('Getting session with timeout {} for query: {} ({}, {})', timeout, jsonObject, this, this.eventBus) | |
return eventBus.sendWithTimeout(ServiceLocation.BUS_SESSION_SERVICE_LOCATION, jsonObject, timeout).map(body(true)) | |
} | |
public static <T> Func1<RxMessage<T>, T> body(boolean logMessage) { | |
return { RxMessage<T> message -> |
I hereby claim:
To claim this, I am signing this object:
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="kolo" | |
#ZSH_THEME="nicoulaj" |
"""Save at /opt/qbase5/lib/python/site-packages/pylogcapture.py""" | |
from pylabs import q | |
from nose.plugins.base import Plugin | |
from nose.util import ln, safe_str | |
class PyLogTarget(object): | |
# TODO: memory management, filtering | |
enabled = True |
input { | |
stdin { | |
type => "stdin-type" | |
} | |
file { | |
type => "pylabs" | |
path => [ "/opt/qbase5/var/log/pylabslogs/*/*.log" ] | |
} |
# Hacky script for downloading videos from PyVideo and converting them to m4v | |
# format so they can be synced onto your apple device. Useful if you | |
# want to see everything that happened at PyCon while commuting. | |
# | |
# Requirements: | |
# * pip install requests BeautifulSoup | |
# * youtube-dl (from https://github.com/rg3/youtube-dl/) - add this to the | |
# directory where this script runs and ensure its execute bit is set. | |
# This was the only YouTube downloader I found that worked. It doesn't | |
# really have a good Python API so I call it through os.system. |