Skip to content

Instantly share code, notes, and snippets.

View alcides's full-sized avatar

Alcides Fonseca alcides

View GitHub Profile
@alcides
alcides / Rakefile
Created April 4, 2012 17:49 — forked from rubenfonseca/Rakefile
Rakefile + CoffeeScript + Titanium Mobile example
DEV_PROVISIONING_UUID = "3E4D9E49-E44B-4B73-AFAD-248C720ECD53"
DEV_SIGN = "Ruben Fonseca"
DEV_APP_NAME = "My greatest app"
DEV_APP_ID = 'com.0x82.app'
TITANIUM_SDK_VERSION = '1.8.2'
IPHONE_SDK_VERSION = '5.0'
BUILDER_PATH = "/Library/Application Support/Titanium/mobilesdk/osx/#{TITANIUM_SDK_VERSION}/iphone/builder.py"
if File.exists?(BUILDER_PATH)
@alcides
alcides / py-randomizer.py
Created September 30, 2011 17:53 — forked from laginha/randomizer.py
Interface built over python module random
import random, math
MAX = 100
MIN = 10
class Randomizer:
def __init__(self):
self.choice = random.choice
self.list = lambda f,m: [ f() for i in self.range(0,m) ]
self.hash = lambda a,b: dict( zip( a(), b() ) )
[1, 2, 3, 4, 5].map {|i| i * 2 }.find_all {|i| i > 5 }
# I have started monkey-patching `alias_method :filter, :find_all` in Array.
/* `HTML5 Reset
----------------------------------------------------------------------------------------------------*/
a,
abbr,
address,
article,
aside,
audio,
b,
I want to build a really simple script to use on Windows. I know
nothing about Windows programming.
Scenario:
I've got a shitty DSL line that doesn't have much bandwidth.
I want to prioritise certain applications. I've got some services
on my Linux box that I want to turn off when a user on a particular
Windows machine is running certain applications.
Plan:
(1..49).to_a.sort_by{ rand }.slice(0..6).sort