Skip to content

Instantly share code, notes, and snippets.

View sliminality's full-sized avatar

Slim sliminality

View GitHub Profile
@sliminality
sliminality / about.md
Last active June 7, 2018 19:10
wasm-trace disassembly comparison https://github.com/sarahlim/wasm-trace/

Instrumenting WebAssembly modules to log calls and returns

An example of the instrumentation performed by wasm-trace. See the diff between the two versions of function_calls.wat.

@sliminality
sliminality / fn_calls.rs
Created May 25, 2018 22:13
Breaking down the wast format
#[no_mangle]
pub extern "C" fn double_subtract5_add1(x: i32) -> i32 {
let result = double(x) + negate(5) + 1;
return result;
}
#[no_mangle]
pub fn double(x: i32) -> i32 {
return x * 2;
}
@sliminality
sliminality / README.md
Last active December 10, 2023 04:30
Hidden dependencies in CSS

Hidden dependencies

Sarah Lim, Northwestern University

Update, September 2019: This Gist detailed an early idea which formed the basis for a major research project. For more information, you can read the resulting full paper, which received Best Paper Honorable Mention at UIST 2018. A tool based on this research is now available on Firefox Nightly.

What are hidden dependencies?

Hidden dependencies between CSS properties are a common source of beginner confusion. For instance, a user might write the following code in order to vertically align some text within a <div>:

@sliminality
sliminality / Code.gs
Created February 17, 2018 21:51
Google Sheets script for my ops keystone, inspired by http://sebastianmarshall.com/key-points-week-one
var config = {
templateSheetName: 'TEMPLATE',
dateFormat: 'ddd M/d',
sheetTitlePrefix: 'Week ',
daysPerSheet: 7,
showLatestOnLeft: true,
dateHeaderRow: 1,
};
// Get the first sheet from the given spreadsheet.
@sliminality
sliminality / notes.md
Created November 19, 2017 23:48
messy notes from learning git

Remotes

Upstream vs downstream?

  • upstream is where you cloned from (origin)
  • downstream is any project that integrates your work

Origin

These things are equivalent and refer to the branch named master on the remote named origin:

  • remotes/origin/master
  • origin/master
@sliminality
sliminality / finding-papers.md
Created October 16, 2017 17:48
LIP: finding good/relevant papers

LIP: Finding good/relevant papers

Search/read with intentionality

        old <-------------------> new
theoretical <-------------------> system

"Most similar papers" will probably be towards the (new, concrete) end

@sliminality
sliminality / simple.tex
Created September 26, 2017 21:20
Simple pandoc template
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
$if(beamerarticle)$
\usepackage{beamerarticle} % needs to be loaded first
$endif$
$if(fontfamily)$
\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
$else$
\usepackage{lmodern}
$endif$
$if(linestretch)$
@sliminality
sliminality / reference.md
Last active July 6, 2017 17:32
Sublime project config reference

Build system arguments

Argument Example Notes
cmd ['python', '-m', '$project'] Required if shell_cmd is empty; overridden by shell_cmd; searched in PATH
shell_cmd yarn build Required if cmd is empty; overrides cmd
working_dir ?? Temporarily change to directory before executing cmd
env { EDITOR: 'vim' }? Can merge in a dictionary before passing to cmd; expands environment variables.
shell true Runs cmd through the shell if true; noop if shell_cmd is used
path /User/sarah/git Used by cmd; expands environment variables.
@sliminality
sliminality / README.md
Last active July 4, 2017 11:30
The Missing README provides installation instructions for true JavaScript development beginners

The Missing README for JavaScript Projects

This README provides general instructions for installing Node.js and npm ecosystem projects from GitHub.

Many project READMEs assume a baseline level of user knowledge, but the following "Getting Started" section isn't very helpful to an absolute beginner:

Getting Started

npm install
@sliminality
sliminality / 111-w17-tutorial9.md
Last active June 24, 2017 09:32
Final exam review problems for EECS 111, Winter 2017

EECS 111 Winter 2017 Tutorial 9 (Exam Practice)

Sarah Lim (http://sarahlim.com/eecs-111)

Q1. Scope and Mutation

In most countries, the age of majority is 18. Some countries have different laws. In Scotland, for instance, the age of majority is 16.

Suppose we want to write a program to determine whether someone is a legal adult. We'll write a global version that works for most countries, and a Scotland-specific version.