Skip to content

Instantly share code, notes, and snippets.

View okiess's full-sized avatar

Oliver Kiessler okiess

View GitHub Profile
@okiess
okiess / AppDelegate.m
Created September 25, 2012 12:48
App Delegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Your other code
tabBarController.tabBar.maximumTabWidth = 64.0f;
tabBarController.tabBar.backgroundColor = [UIColor whiteColor];
tabBarController.tabBar.backgroundImage = [UIImage imageNamed:@"tabbar_background"];
tabBarController.tabBar.layoutStrategy = JBTabBarLayoutStrategyFill;
// Your other code
}
@okiess
okiess / AppDelegate.m
Created September 25, 2012 12:38
App Delegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// your other code
self.tabBarController = [[JBTabBarController alloc] init];
NSMutableArray* controllers = [NSMutableArray arrayWithObject:[[UINavigationController alloc] initWithRootViewController:[[NewsViewController alloc] init]]];
[controllers addObject:[[UINavigationController alloc] initWithRootViewController:[[FavoritesViewController alloc] init]]];
[controllers addObject:[[UINavigationController alloc] initWithRootViewController:[[AboutViewController alloc] init]]];
@okiess
okiess / GCMIntentService.java
Created July 21, 2012 15:56
Example implementation of a GCM Intent Service receiver
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.preference.PreferenceManager;
import android.util.Log;
import com.apphoshies.core.services.DeviceToken;
import com.google.android.gcm.GCMBaseIntentService;
@okiess
okiess / Gemfile
Created April 9, 2012 10:05
Simple ODM for AvocadoDB
source "http://rubygems.org"
gem 'httparty'
gem 'json'
group :development do
gem "shoulda", ">= 0"
gem "bundler", "~> 1.0.0"
gem "jeweler", "~> 1.6.4"
gem "rcov", ">= 0"
end
@okiess
okiess / avocadodb-lion-install.sh
Created February 9, 2012 13:12
Bootstrap Script to install AvocadoDB from Git
#!/bin/sh
#### Configuration ####
boost_version="1.48.0"
libev_version="4.04"
v8_version="3.7.0"
#######################
rm avocadodb
rm -rf build
@okiess
okiess / MainActivity.java
Created February 7, 2011 12:38
Install Count SDK Android Sample
private static final String APP_VERSION = "1.0"; // Your app version
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
ConfigurationFactory.newConfiguration(sharedPreferences,
@okiess
okiess / AppDelegate.m
Created February 4, 2011 15:43
Install Count SDK Sample
#import "AppHoshies.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[APHConfigurationFactory configuration];
[APHAppTracking startSession];
// your code
return YES;
@okiess
okiess / git-repo.rb
Created April 2, 2010 23:03
git-repo.rb
#!/usr/bin/env ruby
# Script to synchronize git repository structures between machines.
require "yaml"
# git-repo.yml example:
#
# workspace:
# versioned:
We couldn’t find that file to show.
@okiess
okiess / rails3_bundler_template.rb
Created January 4, 2010 14:44
Rails3 Pre with Bundler Rails Template
############## commands #################
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore"
run %{find . -type d -empty | grep -v "vendor" | grep -v ".git" | grep -v "tmp" | xargs -I xxx touch xxx/.gitignore}
run "rm .gitignore"
file '.gitignore', <<-ENDEND
.DS_Store
log/*.log
tmp/**/*
config/database.yml