Skip to content

Instantly share code, notes, and snippets.

Marco Fabbri mrfabbri

Block or report user

Report or block mrfabbri

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
View index.html
<script type="text/javascript">
var nw = require('nw.gui');
var win = nw.Window.get();
var nativeMenu = new nw.Menu({ type: 'menubar' });
if ('createMacBuiltin' in nativeMenu) {

Keybase proof

I hereby claim:

  • I am mrfabbri on github.
  • I am mrfabbri ( on keybase.
  • I have a public key whose fingerprint is 429D DE03 5870 DBDA 08DF FA36 D98A B29A 1271 2285

To claim this, I am signing this object:

mrfabbri /
Created Oct 5, 2014
Starts and stops screen and audio (Mac) recording of an android attached device via adb
function stop_record() {
echo "stopping audio recording"
cat << EOF | osascript -l AppleScript
tell application "Quicktime Player"
stop last item of (documents whose name contains "Audio Recording")
end tell
mrfabbri / streams-interleave.rkt
Last active Aug 29, 2015
Interleaving streams in Racket
View streams-interleave.rkt
#lang racket
;; produce a new stream with the elements of the given streams interleaved
(define (streams-interleave . streams)
(letrec ([loop (lambda (streams)
(let ([next ((car streams))])
(cons (car next)
(thunk (loop (append (cdr streams) (list (cdr next))))))))])
(thunk (loop streams))))
mrfabbri / shadow-stream.rkt
Created Nov 3, 2014
Shadow stream in Racket
View shadow-stream.rkt
;; Returns a stream that shadows side-effects of the original stream
;; when accessed after the first time
(define (shadow-stream s)
(let ([shadow-next #f])
(thunk (begin
(when (not shadow-next)
(let ([next (s)])
(set! shadow-next (cons (car next) (shadow-stream (cdr next))))))
(cons (car shadow-next) (cdr shadow-next))))))
View react.min.js
* React v0.5.0
* Copyright 2013 Facebook, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Automate loading of F-Script Anywhere into any app.
By Daniel Jalkut - @danielpunkass -
Revision 0.2 by Marco Fabbri - @mrfabbri -
To set up:
0. Make sure you have FScript.framework installed in /Library/Frameworks (
1. Copy this script to ~/.lldb/
2. Add the following to your ~/.lldbinit file:
mrfabbri /
Last active Aug 29, 2015
F-Script injection script
#!/usr/bin/env zsh
usage() {
echo "Injects F-Script (menu) into a running application (via lldb)"
echo "usage: $(basename $0) [-c] <application-name-or-PID>"
echo "options:"
echo "-c \t\topens F-Script console (useful for apps lacking a menu bar):"
mrfabbri / noderunner.js
Last active Aug 29, 2015
Noderunner + Dropbox
View noderunner.js
//The MIT License (MIT)
//Copyright (c) 2014 Dave Winer
//Permission is hereby granted, free of charge, to any person obtaining a copy
//of this software and associated documentation files (the "Software"), to deal
//in the Software without restriction, including without limitation the rights
//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//copies of the Software, and to permit persons to whom the Software is
//furnished to do so, subject to the following conditions:
mrfabbri / eulerworker.html
Created Sep 19, 2010
A quick scaffolding html file to load a web worker at runtime, a sample web worker file is provided. Aimed at tinkering with project euler problems in JavaScript without freezing the browser.
View eulerworker.html
width: 400px;
margin: 10px;
You can’t perform that action at this time.