Skip to content

Instantly share code, notes, and snippets.

Michael Cooper mythmon

Block or report user

Report or block mythmon

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
@mythmon
mythmon / big_colors.p8
Created Aug 17, 2019
that s thing pico-8
View big_colors.p8
pico-8 cartridge // http://www.pico-8.com
version 18
__lua__
-- that s thing
-- generative art
#include ../lib/debug.p8
tile_s=8
map_s=ceil(128/tile_s)
View gist:2db1b99805e2af6fb8fbf83b48cd4823
{
"multi-addon-experiment": {
$schema: "http://json-schema.org/draft-04/schema#",
title: "Enroll a user in an add-on experiment, with managed branches",
type: "object",
required: [
"name",
"description",
"branches",
],
View gist:74b98cdd9e76e0b798c291659ce1e4ef
### Keybase proof
I hereby claim:
* I am mythmon on github.
* I am mythmon (https://keybase.io/mythmon) on keybase.
* I have a public key whose fingerprint is B48F E1DE EE4E 406B BC18 2333 D94C 5474 25E0 8CC5
To claim this, I am signing this object:
View uptake 2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View client-filter-expressions.jsm
// Execute this in a chrome-context Scratchpad or browser console
Cu.import('resource://shield-recipe-client/lib/ClientEnvironment.jsm');
Cu.import('resource://shield-recipe-client/lib/FilterExpressions.jsm');
async function main() {
const context = ClientEnvironment.getEnvironment();
const filterExpression = 'normandy.country == "US" && normandy.isDefaultBrowser';
const result = await FilterExpressions.eval(filterExpression, context);
console.log(result);
}
@mythmon
mythmon / index.js
Last active Aug 23, 2016
requirebin sketch
View index.js
document.write('oh hai');
@mythmon
mythmon / jexl-spike.js
Created Jun 15, 2016
Jexl custom evaluator shim
View jexl-spike.js
import {elements as defaultGrammar} from 'jexl/lib/grammar.js';
import defaultParser from 'jexl/lib/parser/Parser.js';
import defaultEvaluator from 'jexl/lib/evaluator/Evaluator.js';
import defaultLexer from 'jexl/lib/Lexer.js';
export function customEval(
expr,
context={},
{
transforms={},
View Untitled2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View shield
future ideas
* rule previewer
* I am a user in CANADA I am the FOURTH user. What do I get?
Notes from meeting
* no user should get the same question twice
* this could be done on the client
* or we could just never send the payload to the same user twice, providing a set collection primitive.
* we need to record how many users take each action from the responses
* I don't know if this is our part or something in heartbeat/input
@mythmon
mythmon / brainfuck.rs
Last active Dec 1, 2015
A simple Brainfuck interpreter in Rust
View brainfuck.rs
use std::convert::Into;
use std::io::{self, Read, Bytes};
use std::str::FromStr;
fn main() {
let mut input = io::stdin().bytes();
let program = "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.";
let mut machine: BrainFuck = program.parse().unwrap();
match machine.execute_all(&mut input) {
Ok(s) => print!("{}", s),
You can’t perform that action at this time.