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 September 23, 2025 16:14
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'
@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

@canadaduane
canadaduane / bbwifi.txt
Created May 19, 2013 18:41
BeagleBone WiFi can be manually enabled with "test-connman connect" but autoconnect fails
# Adventures In Wireless BeagleBone Black:
# What prevents my Edimax WiFi USB dongle from autoconnecting to my home WiFi network, "Catalina Island Network"?
# NOTE: If you're here to glean info for your own setup, note that I've installed the
# following two connman auxiliary packages which give the tools and test scripts in
# /usr/lib/connman/test that I use below
# $ opkg install connman-tools connman-tests
#
# Also, I've disabled power save mode for the WiFi so that the BBB can act as a server:
# $ cat > /etc/udev/rules.d/wifi_power_save.rules <<-EOF
@Tomen
Tomen / webgl-demo.dart
Last active December 17, 2015 07:39 — forked from martinsik/webgl-demo.dart
import 'dart:html';
import 'dart:web_gl';
import 'dart:typed_data';
/**
* WebGL Demo made in Dart. It works in http://try.dartlang.org/
* Updated: 2013-05-14
* created by: http://martinsikora.com/dart-webgl-simple-demo
* updated by: https://plus.google.com/u/0/117240004279526018872
*/
@sma
sma / dexpess.md
Last active December 17, 2015 03:49
A tutorial on how to recreate some parts – the important ones, I hope – of Express.js in Dart.

Dexpress

I like [Express][1] for Node.js. I'd like to have a similar framework for Dart.

Let's create it. How hard can it be? :-)

Middleware is Everywhere