Skip to content

Instantly share code, notes, and snippets.

View andremedeiros's full-sized avatar
:shipit:

André Medeiros andremedeiros

:shipit:
View GitHub Profile
@andremedeiros
andremedeiros / apploop.diff
Created May 13, 2014 16:46
OS X App loop in ruby
From 2b0c152b9eacdbcbdb47c3aadf47f75b0d373e17 Mon Sep 17 00:00:00 2001
From: Andre Medeiros <me@andremedeiros.info>
Date: Tue, 13 May 2014 17:45:26 +0100
Subject: [PATCH] Run an application loop.
---
ext/skruby/extconf.rb | 2 +-
ext/skruby/skruby.m | 3 +++
ext/skruby/skruby_application.h | 8 ++++++++
ext/skruby/skruby_application.m | 36 ++++++++++++++++++++++++++++++++++++
~/Development/sandbox
❯ dbundle gem foobar --ext
create foobar/Gemfile
create foobar/Rakefile
create foobar/LICENSE.txt
create foobar/README.md
create foobar/.gitignore
create foobar/.consolerc
create foobar/foobar.gemspec
create foobar/lib/foobar.rb
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP JS 0.0.1
Comment: https://keybase.io/crypto
wcFMA9xpXI1SoNwqAQ/+IDtM5wOpxqsrxRpZUW9IQlciTDLBUYb4fCdtgU1/E9CW
ANY5p51/qDJTTE1TJDFKjz20505k06fCZdhT4klHoeFtezEnc3uYPFR0Qb8GqJLS
hYWOu/ANlzy2STn0uRsaAbTD2B44fR7XZCBXsNEtoOgcvt7ylTOXszZjvLk7istt
01wftl+P/Y03bjZtgc4PvBdv0uytq366vIlIqfo0kbAC7ffajd4AdriaD9UIU4S6
eQpEUIe/u20cEIDIYleuckYP4sTj9KzJtbRopH5C4js2+neJJ3IEfmL5bMbSmtRu
xLn5BuZ2T9HM/sfF6QRyI7TRfDJXz3lUSJyboy+upoQNdPMibW7x5SKoHcdcbPtt

Keybase proof

I hereby claim:

  • I am andremedeiros on github.
  • I am andremedeiros (https://keybase.io/andremedeiros) on keybase.
  • I have a public key whose fingerprint is 69DD D1E4 06BE C8B7 A183 3387 E7C8 3C56 BC29 F743

To claim this, I am signing this object:

@andremedeiros
andremedeiros / Makefile
Created October 18, 2012 12:33
Makefile for a Typescript project
all: compile test
deps:
if ! test -d node_modules; then npm install; fi
clean:
rm -rf lib/*
TMP_FILE := $(shell mktemp -t project_name)
compile: deps clean
@andremedeiros
andremedeiros / BaseViewController.m
Created October 17, 2011 10:25 — forked from boctor/BaseViewController.m
A base view controller class that when running on the simulator in debug mode, will auto simulate a memory warning every time the view controller's viewDidAppear is called
//
// BaseViewController.m
//
// Created by Peter Boctor on 5/4/11.
//
// Copyright (c) 2011 Peter Boctor
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
@andremedeiros
andremedeiros / retry_upto.rb
Created October 7, 2011 08:41 — forked from raul/retry_upto.rb
retry_upto.rb
# Ruby's `retry` with steroids:
#
# - retry up to 5 times without waiting between them and retrying after any exception
#
# retry_upto(5) do ... end
#
# - retry up to 5 times, waiting 2 seconds between retries and retrying after any exception
#
# retry_upto(5, :wait => 2) do ... end
#
@andremedeiros
andremedeiros / .gitignore
Created June 13, 2011 14:26
Xcode4 gitignore
.DS_Store
*.swp
*~.nib
build/
*.pbxuser
*.perspective
*.perspectivev3
/*
Licensed under the MIT License
Copyright (c) 2011 Cédric Luthi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@andremedeiros
andremedeiros / LICENSE.txt
Created May 17, 2011 10:42 — forked from jed/LICENSE.txt
route client urls with 404s and pattern captures
Copyright (c) 2011 Jed Schmidt, http://jed.is
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions: