Skip to content

Instantly share code, notes, and snippets.

@staltz
staltz / introrx.md
Last active June 28, 2025 13:44
The introduction to Reactive Programming you've been missing
  • Dynamic Dispatch
  • Dynamic Method
  • Ghost Methods
  • Dynamic Proxies
  • Blank Slate
  • Kernel Method
  • Flattening the Scope (aka Nested Lexical Scopes)
  • Context Probe
  • Class Eval (not really a 'spell' more just a demonstration of its usage)
  • Class Macros
@romannurik
romannurik / DrawInsetsFrameLayout.java
Created February 10, 2014 16:28
DrawInsetsFrameLayout — adding additional background protection for system UI chrome when using KitKat’s translucent decor flags.
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@michaelfairley
michaelfairley / stuff.md
Last active June 11, 2017 21:02
Makin' Games with Ruby
@jimweirich
jimweirich / eternal_flame.sng
Created August 8, 2013 05:59
Words/Chords to the Eternal Flame
The Eternal Flame (God Wrote in Lisp)
Bob Kanefsky / Julia Ecklar
F G C
I was taught assembler in my second year of school.
F G C
It's kinda like construction work, with a toothpick for a tool.
F G C Em Am
So when I made my senior year, I threw my code away,
@Clancey
Clancey / ParseHelper
Last active December 18, 2015 04:08
Parse helper class
/* Sample object
public class EventModel
{
[DataMember(Name = "description")]
public string Description {get;set;}
[DataMember(Name = "endTime")]
public DateTime EndTime {get;set;}

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

async Task ShowStuffAsync ()
{
var client = new HttpClient ();
var content = JsonValue.Parse (await client.GetStringAsync ("http://api.worldbank.org/countries?format=json"));
int number_of_countries = content [0] ["per_page"];
int done = 0, error = 0;
CountriesLabel.Text = string.Format ("Countries: {0} done: 0 error: 0", number_of_countries);
@sxua
sxua / 0-readme.md
Created October 13, 2012 16:14 — forked from burke/0-readme.md
ruby-1.9.3-p286 cumulative performance patch.

Patch for ruby 1.9.3-p327 is here: https://gist.github.com/4063779

Patched ruby 1.9.3-p286 for 30% faster rails boot

Overview

This script installs a patched version of ruby 1.9.3-p286 with boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Many thanks to funny-falcon for the performance patches.

@aphyr
aphyr / gist:3200862
Created July 29, 2012 18:30
Clojure message passing test
(ns messagepassing.core)
(import [java.util.concurrent LinkedTransferQueue])
(def m 10000000)
(defn queue-test []
(defn bounce [in out m]
(let [value (.take in)]
(if (< value m)
(do