This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This script and build target will take the revision number from a Subversion repository (or a Git | |
repository using git-svn) and substitute the last dotted component of the CFBundleVersion in your | |
Info.plist file (you can put something like "1.0.0.xx" for your first run). | |
Instructions: | |
- Save update_build_number.rb into ${PROJECT_DIR}/Scripts (or wherever you want, but remember to | |
change the paths accordigly in the build phase). | |
- Add a new target to your project (I named mines as "Update FooBar Build Number"). In new target | |
dialog choose from "Other" category "Shell Script Target". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def month_names_between | |
# No hay necesidad de convertir en string para comparar | |
return [I18n.l(fecini, :format => '%B')] if fecini.month == fecfin.month && fecini.year == fecfin.year | |
# De nuevo, no hay necesidad de convertir en string y luego en entero. | |
# Además utilizo nombres más descriptivos. | |
anio_inicio = fecini.year | |
anio_final = fecfin.year | |
mes_inicio = fecini.month | |
mes_final = fecfin.month | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -urN -x 'Makefile*' -x '*comp.sh' -x libtool -x x-to-1 -x stamp-h1 -x POTFILES -x gettext.sh -x '*config*' gettext-0.17/gettext-runtime/gnulib-lib/setenv.c gettext-0.17-mine/gettext-runtime/gnulib-lib/setenv.c | |
--- gettext-0.17/gettext-runtime/gnulib-lib/setenv.c 2007-10-07 22:28:16.000000000 +0200 | |
+++ gettext-0.17-mine/gettext-runtime/gnulib-lib/setenv.c 2009-09-13 20:11:21.000000000 +0200 | |
@@ -39,7 +39,8 @@ | |
#if !_LIBC | |
# define __environ environ | |
# ifndef HAVE_ENVIRON_DECL | |
-extern char **environ; | |
+# include <crt_externs.h> | |
+# define environ (*_NSGetEnviron()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reachability Objective-C minimal version | |
// I'm new so memory leaks are possible on this code | |
// Extracted from: | |
// http://www.idevapps.com/forum/archive/index.php/t-3329.html | |
// (look for an imported_kelvin's post) | |
// | |
+ (BOOL)networkAvailable{ | |
SCNetworkReachabilityRef netreach; | |
SCNetworkConnectionFlags flags; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
EXPIRATION_IN_SECONDS=5000 | |
ERROR_ICON=gtk-dialog-error | |
SUCCESS_ICON=gtk-dialog-info | |
function notify () | |
{ | |
notify-send -t $((EXPIRATION_IN_SECONDS*1000)) -i $3 "${1}" "${2}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $ g++ -o test -framework Foundation -Wall test.mm | |
// $ ./test | |
// The string length is 12 | |
// The string third char value is 108 | |
// The string is Hello World! | |
#include <iostream> | |
#import <Foundation/Foundation.h> | |
class MyCppNSStringWrapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Day job: Mobile Engineer at Tuenti (http://tuenti.com) | |
Your Rails contributions (if any): Yes, of course http://contributors.rubyonrails.org/contributors/daniel-rodriguez-troitino/commits (and some old plugins) | |
What's your Ruby/Rail experience?: I have been using Rails for pet projects since it was a 0.x (end of 2006), and profesionally for a year or so in a previous job. | |
How do you use GitHub?: Now mainly for personal projects and open source contributions, and to keep track of interesting projects. I have used GitHub at work, but not anymore (now my shared repositories are self-hosted). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Day job: | |
Mobile Application Developer at Tuenti <http://tuenti.com>. | |
What is your language of choice: | |
My main language will be Objective-C, helped by Ruby for almost anything else. | |
Open Source contributions: | |
Several contributions to Rails and other Ruby open source libraries (SQLite-Ruby, FeedTools). Contributions in some Objective-C/Cocoa projects (Wordpress.app, SQLPersistentObjects, Adium, AppReviews, NuZip, Twitterfon). A lot of small contributions in different open source projects (Scour, Zenphoto, Sproutcore, K2, Trac, Gtk#, RadRails). Some released open source personal projects (video5 Chrome extension, globradio, reversegeocoding, Custer). | |
How do you use GitHub: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_partial_sum(array, goal) | |
istart, iend, sum = 0, 0, 0 | |
while iend < array.length | |
while iend < array.length && sum < goal | |
sum += array[iend] | |
iend += 1 | |
end | |
while istart < iend && sum > goal | |
sum -= array[istart] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This document specifies exceptions to the backup | |
# To specify an EXCLUSION, put "- " (a minus and a space) before the entry | |
# To specify an INCLUSION, put "+ " (a plus and a space) before the entry | |
# Rules are applied IN ORDER | |
# | |
# These rules allow backing up of the iTunes Music Library files, | |
# but not the other contents of ~/Music or ~/Music/iTunes/ | |
+ iTunes/ | |
+ .localized | |
- iTunes Music/ |
OlderNewer