Skip to content

Instantly share code, notes, and snippets.

View harmo's full-sized avatar

David Talagrand harmo

View GitHub Profile
@tito
tito / utmotionevent.py
Last active August 29, 2015 14:16
Example of mock-MotionEvent for unittest
# subclass for touch event in unit test
class UTMotionEvent(MotionEvent):
def depack(self, args):
self.is_touch = True
self.sx = args['x']
self.sy = args['y']
self.profile = ['pos']
super(UTMotionEvent, self).depack(args)
anonymous
anonymous / untrusted-lvl10-solution.js
Created October 25, 2015 09:42
Solution to level 10 in Untrusted: http://alex.nisnevich.com/untrusted/
/*************
* ambush.js *
*************
*
* Oh. Oh, I see. This wasn't quite part of the plan.
*
* Looks like they won't let you take the Algorithm
* without a fight. You'll need to carefully weave your
* way through the guard drones.
*
@brunobord
brunobord / 200-square-dungeon.md
Last active April 14, 2016 23:02
200 square dungeon

200 square dungeons

Draw on a squared paper sheet.

The entrance is 1 square wide.

The dungeon has 3 stats: danger, depth, secret. Spread +2, +1, -1.

Each room

@awonak
awonak / generative_seq.ino
Last active August 17, 2023 08:30
Generative sequencer firmware for the Hagiwo Sync LFO.
// Install the "AVR Standard C Time Libaray", used for faster PWM frequencies
// and smoother analog cv output.
#include <avr/io.h>
// GPIO Pin mapping for knobs and jacks.
#define P1 0 // Probability
#define P2 1 // Sequence step length
#define P3 3 // Amplitiude
#define P4 5 // Refrain count