Skip to content

Instantly share code, notes, and snippets.

View brodo's full-sized avatar

Julian Dax brodo

View GitHub Profile
@brodo
brodo / serialsniffer.rb
Last active October 21, 2021 18:32
Serialsniffer for Mac OS X: Sniffs an OPEN serial connection. The connection must be open before you run the script.
#!/usr/bin/env ruby
# Sniffs a serial Connection. Prints all unprintable characters!
# Only tested under Mac OS X 10.8. (should work with earlier versions)
# Uses dtruss, which comes with Mac OS.
#
# Usage:
# $ ./serialsniffer.rb <serial device>
#
# Example:
@brodo
brodo / sniffFileAccess
Created March 10, 2013 23:17
D program to sniff all access to a file.
#! /usr/sbin/dtrace -s
#pragma D option quiet
dtrace:::BEGIN
{
self->start = 0;
}
syscall::write:entry,
syscall::write_nocancel:entry,
@brodo
brodo / gist:5637455
Last active December 17, 2015 16:19
public static Action<IMaybe<TA>> LiftToMaybe<TA>(this Action<TA> func) where TA : class
{
return param =>
{
var justparam = param as Just<TA>;
if (justparam == null || justparam.Value == null) return;
func(justparam.Value);
};
}
Name // Kommentar
Programming
===========
The Haskell Cast // Hart, aber nicht so hart
ThoughtWorks // Noch nicht viel davon gehört
Herding Code // Allemein, einfach
DevOps Cafe Podvast // DER Podcast zu DevOp
Q.E.D. Code // Mathe + Programmierung, gut verständlich
-- Actions
type Action =
NoOp
| PlayerList PlayerList.Action
| Games Games.Action
| Global Globals.GlobalAction
[
{ "keys": ["Down"], "command": "move_cursor_down" },
{ "keys": ["Shift+Down"], "command": "move_cursor_down", "args": {"toggle_selection": true} },
{ "keys": ["Up"], "command": "move_cursor_up" },
{ "keys": ["Shift+Up"], "command": "move_cursor_up", "args": {"toggle_selection": true} },
{ "keys": ["Cmd+Up"], "command": "move_cursor_home" },
{ "keys": ["Shift+Cmd+Up"], "command": "move_cursor_home", "args": {"toggle_selection": true} },
{ "keys": ["Cmd+Down"], "command": "move_cursor_end" },
{ "keys": ["Shift+Cmd+Down"], "command": "move_cursor_end", "args": {"toggle_selection": true} },
{ "keys": ["Alt+Down"], "command": "move_cursor_page_down" },
<html>
<head>
<title>IPFS Cats!</title>
</head>
<body>
<h1>IPFS Cats</h1>
<img src="cat1.jpg"/>
<img src="cat2.jpg"/>
<img src="cat3.jpg"/>
</body>
# Dictionary-Comprehensions
characters = [
"0,Regulus Arcturus Black",
"1,Sirius Black",
"2,Lavender Brown",
"3,Cho Chang",
"4,Vincent Crabbe Sr.",
"5,Vincent Crabbe",
"6,Bartemius Crouch Sr.",
"7,Bartemius Crouch Jr.",
@brodo
brodo / ipfs_workshop.md
Created March 8, 2018 14:17
IPFS Workshop
@brodo
brodo / rollup.config.js
Created December 4, 2019 12:46
Svelte ui5-wc rollup
import svelte from 'rollup-plugin-svelte';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import livereload from 'rollup-plugin-livereload';
import scss from 'rollup-plugin-scss'
import url from "@rollup/plugin-url";
import { terser } from 'rollup-plugin-terser';
import { string } from "rollup-plugin-string";
import json from '@rollup/plugin-json';