Skip to content

Instantly share code, notes, and snippets.

View bmeurer's full-sized avatar

Benedikt Meurer bmeurer

View GitHub Profile
@bmeurer
bmeurer / ocaml-git-sync.sh
Created August 18, 2011 14:17
Sync the ~/git/ocaml.git repository with the master Subversion repository at Inria and upload the changes to GitHub at bmeurer/ocaml.
#!/bin/sh
# ~/bin/ocaml-git-sync.sh: Sync the ~/git/ocaml.git repository with the master
# Subversion repository at Inria and upload the changes
# to GitHub at bmeurer/ocaml.
# Copyright (c) 2011 Benedikt Meurer <benedikt.meurer@googlemail.com>
#
# Repository location
GIT_DIR="$HOME/git/ocaml.git"
export GIT_DIR
@bmeurer
bmeurer / gist:1026439
Created June 15, 2011 03:51
Nice transition from splash screen to main application screen using fade out and zoom in animation. Change the -application:didFinishLaunchingWithOptions: method of your application delegate class like this (assuming your splash image is named Default.png
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Put necessary initialization steps here...
// Add imageView overlay with fade out and zoom in animation
UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.window.frame];
imageView.image = [UIImage imageNamed:@"Default"]; // assuming your splash image is "Default.png" or "Default@2x.png"
[self.window addSubview:imageView];
[self.window bringSubviewToFront:imageView];
[UIView transitionWithView:self.window
@bmeurer
bmeurer / UILabel+BMRoundedRectAdditions.h
Created June 13, 2011 15:05
Category on UILabel which adds a property showsRoundedRect, which, if set to YES, causes the label to be drawn on a rounded rect, similar to the emblem shown for the number of new mails in the iPhone Mail app.
/*-
* Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.