Skip to content

Instantly share code, notes, and snippets.

Jan Lehnardt janl

Block or report user

Report or block janl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
janl /
Last active Aug 21, 2018
The New Hoodie Architecture

// this is a draft of an outline of an result of an in-person meeting that will eventually live in a GitHub issue for the community to discuss, this is just to vet the outline with the in-person meeting members.

New Hoodie Architecture

This is going to be a long one, grab a nice beverage and enjoy the ride :)

Table of Contents

  • Motivation
    • Making work on and with Hoodie easier and more fun
janl /
Last active Aug 29, 2015
string interpolation / variable substitution
#!/bin/sh -ex
# I have a variable that’s a string, that includes the expansion for another variable, albeit quited: `\${foo}`
# how can I get a string that is that original string, but with the variable expanded?
# no bashisms allowed, this needs to be stock-sh.
# insert magic here
janl / checkbashisms.log
Last active Aug 29, 2015
You had one job
View checkbashisms.log
> head -1 configure
> checkbashisms -f configure
> echo $?
> head -1 configure

@ppk asks: “OK, suggestions for my next bit of research?” —

@rem replies: “@ppk storage. What works in browser, what browsers, what phones, how it changes when *added to home screen", limits, etc. How's that?” —

Here’s what I whipped up, please add more in the comments:


janl / secadv_20150319.txt
Created Mar 19, 2015
mirror because original at secadv_20150319.txt is slooooow
View secadv_20150319.txt
OpenSSL Security Advisory [19 Mar 2015]
OpenSSL 1.0.2 ClientHello sigalgs DoS (CVE-2015-0291)
Severity: High
If a client connects to an OpenSSL 1.0.2 server and renegotiates with an
invalid signature algorithms extension a NULL pointer dereference will occur.
View flow.js..diff
- var hash = crypt.createHash('sha256');
- hash.update(assetData);
- return hash.digest('hex');
+ return crypt.createHash('sha256')
+ .update(assetData)
+ .digest('hex');
View log
> echo '{"a":1}' | ../node_query_server/bin/qs2
throw new TypeError('invalid data');
TypeError: invalid data
at WriteStream.Socket.write (net.js:614:11)
at null._onTimeout (/Users/jan/Work/qs2/node_query_server/index.js:17:20)
at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
View gist:0fdf85a704d8dc0b32ac
> grunt test
Running "jshint:files" (jshint) task
>> 9 files lint free.
Running "simplemocha:unit" (simplemocha) task
2 passing (6ms)
View gist:0458446af3fa425bd89c
> grunt test
Running "jshint:files" (jshint) task
>> 9 files lint free.
Running "simplemocha:unit" (simplemocha) task
2 passing (6ms)
View gist:10f874b72d63def7105e
attachment_names.js attachment_views.js coffee.js
attachment_paths.js attachments.js delayed_commits.js
attachment_ranges.js attachments_multipart.js erlang_views.js
You can’t perform that action at this time.