Skip to content

Instantly share code, notes, and snippets.

/**
* DotBlock Mobile
*
* @package DotBlock
* @author Joshua Priddle <jpriddle@nevercraft.net>
* @copyright Copyright (c) 2011, DotBlock, Inc
* @version 1.0
* @url http://www.dotblock.com/
*/
/**
* DotBlock Mobile
*
* @package DotBlock
* @author Joshua Priddle <jpriddle@nevercraft.net>
* @copyright Copyright (c) 2011, DotBlock, Inc
* @version 1.0
* @url http://www.dotblock.com/
*/
var $CONFIG = function(key, value) {
if (arguments.length == 2) {
if (value === null) {
Ti.App.Properties.removeProperty(key);
} else {
Ti.App.Properties.setString(key, JSON.stringify(value));
}
} else if (arguments.length == 1) {
var data = Ti.App.Properties.getString(key, false);
return data && JSON.parse(data) || undefined;
#
# Titanium Mobile Rake tasks
#
# Validate and launch your Titanium Mobile application via Rake
#
# Edit Application::COMPILER if not using OS X
# Requires jsl (install on OS X via homebrew with `brew install jsl`)
#
# Only supports iPhone right now.
#

If you would like to get involved, http://www.restorethefourth.net/ is the starting point.

Reasons I, personally, am joining this movement:

Guantanamo (though undoubtedly many dangerous people are there, it is a clear violation of human rights to hold people without trial, and not all held are guilty)

Extraordinary Rendition (the habit of sending people to politically allied states for the purpose of torture, since we "don't do that" here)

No-fly lists (not subject to review, based on low evidence, with many false-positive examples)

#cribbed from http://vimeo.com/52569901 (Twilio carrier call origination moderation)
# The idea is that many fan-in queues can enqueue at any rate, but
# dequeue needs to happen in a rate-controlled manner without allowing
# any individual input queue to starve other queues.
# http://en.wikipedia.org/wiki/Leaky_bucket (second sense, "This version is referred to here as the leaky bucket as a queue.")
#
# requires:
# redis 2.6+
# redis-py>=2.7.0
# anyjson
@marchon
marchon / designer.html
Created November 6, 2015 04:57
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
@marchon
marchon / designer.html
Created November 9, 2015 04:17
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
@marchon
marchon / keybase.md
Created January 5, 2016 01:06
keybase.md

Keybase proof

I hereby claim:

  • I am marchon on github.
  • I am marchon (https://keybase.io/marchon) on keybase.
  • I have a public key whose fingerprint is 884F 18AC CC6B 7058 A4EA 6F30 A572 ED0B 0ADC 2FF3

To claim this, I am signing this object:

@marchon
marchon / shortest.py
Created February 22, 2017 01:11
shortest path finding
import algorithms.a_star_path_finding as pf
maze = """
##########
#A...#...#
#.#.##.#.#
#.#.##.#.#
#.#....#B#
#.#.##.#.#