Skip to content

Instantly share code, notes, and snippets.

View adam-singer's full-sized avatar
👾

Adam Singer adam-singer

👾
View GitHub Profile
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
//Y-Combinator
final Y = (f) =>
((x) => f((y) => x(x)(y)))
((x) => f((y) => x(x)(y)));
//booleans
final TRUE = (x) => (y) => x;
final FALSE = (x) => (y) => y;
final cond = (b) => b;
@Pallinder
Pallinder / .bash_profile
Created September 3, 2013 17:29
Getting golang + mac os x + gdb to play nicely
alias gdbnew='/usr/local/Cellar/gdb/7.6/bin/gdb'
@skybrian
skybrian / sudoku.dart
Last active December 20, 2015 20:38
A line-by-line translation of Peter Norvig's Sudoku solver into Dart.
// Solve Every Sudoku Puzzle in Dart
// A translation of: http://norvig.com/sudopy.shtml
// Translated by Brian Slesinsky
// See http://norvig.com/sudoku.html
// Throughout this program we have:
// r is a row, e.g. 'A'
// c is a column, e.g. '3'
// s is a square, e.g. 'A3'
@alexanderzeillinger
alexanderzeillinger / heatequation
Created June 29, 2013 18:44
Dart Heat Equation Implementation
library heatequation;
import 'dart:html';
import 'dart:async';
import 'dart:collection';
CanvasElement canvas;
CanvasRenderingContext2D context;
List<List<Tile>> world;
Timer running;
@alexanderzeillinger
alexanderzeillinger / A*
Created June 28, 2013 08:23
Dart A* Implementation
library astar;
import 'dart:html';
//import 'dart:async';
import 'dart:collection';
CanvasElement canvas;
CanvasRenderingContext2D context;
List<List<int>> world;
//Timer running;
@alexanderzeillinger
alexanderzeillinger / floodfill
Last active December 19, 2015 01:18
Dart Floodfill Implementation
library floodfill;
import 'dart:html';
//import 'dart:async';
import 'dart:collection';
CanvasElement canvas;
CanvasRenderingContext2D context;
List<List<int>> world;
//Timer running;
@mythz
mythz / 01_sudo.py
Last active December 18, 2015 04:09
Peter Norvig's Sudoku Solver ported to other languages
#full source: https://github.com/dartist/sudoku_solver/blob/master/benchmarks/sudoku.py
def cross(A, B):
"Cross product of elements in A and elements in B."
return [a+b for a in A for b in B]
digits = '123456789'
rows = 'ABCDEFGHI'
cols = digits
squares = cross(rows, cols)
library streams;
import 'dart:html';
import 'dart:async';
import 'dart:uri';
import 'dart:json' as JSON;
import 'package:js/js.dart' as js;
main() {
var inputs =
@zhuowei
zhuowei / glasslabs.md
Last active December 17, 2015 14:29
Glass Labs experiments: what they do

Glass Lab Experiments

Updated: July 2nd (XE7)

Ron Amadeo of Android Police did a review of these experiments: http://www.androidpolice.com/2013/05/24/google-glasss-hidden-labs-features-ok-glass-everywhere-web-browsing-video-stabilization-and-more-video/

Google Glass has a series of Labs experiments that can be enabled on engineering or userdebug builds. Using APKTool, I've removed that restriction and now they can be enabled with root access.

To start, for example, the SOUND_SEARCH lab, type in a root shell