Skip to content

Instantly share code, notes, and snippets.

View florianbachmann's full-sized avatar
💭
rock n roll

Flori florianbachmann

💭
rock n roll
View GitHub Profile
@florianbachmann
florianbachmann / FCPrivateBatteryStatus.m
Created March 14, 2016 21:51
How to get raw battery info (mAh remaining, etc.) from iOS using private APIs. For internal testing only, NOT APP STORE DISTRIBUTION!
#import <Foundation/Foundation.h>
#include <dlfcn.h>
NSDictionary *FCPrivateBatteryStatus()
{
static mach_port_t *s_kIOMasterPortDefault;
static kern_return_t (*s_IORegistryEntryCreateCFProperties)(mach_port_t entry, CFMutableDictionaryRef *properties, CFAllocatorRef allocator, UInt32 options);
static mach_port_t (*s_IOServiceGetMatchingService)(mach_port_t masterPort, CFDictionaryRef matching CF_RELEASES_ARGUMENT);
static CFMutableDictionaryRef (*s_IOServiceMatching)(const char *name);
@florianbachmann
florianbachmann / gist:6d7e7ac914541c893ef8
Last active August 29, 2015 14:19
Screensizes for Icons and Splashscreens
iOS
AppIcon60x60.png ( 60x 60 - iPhone 4)
[email protected] ( 120x 120 - iPhone 5)
[email protected] ( 180x 180 - iPhone 6)
AppIcon76x76~ipad.png ( 76x 76 - iPad)
AppIcon76x76@2x~ipad.png ( 152x 152 - iPad)
[email protected] ( 640x 960 - iPhone 4)
[email protected] ( 640x1136 - iPhone 5)
[email protected] ( 750x1334 - iPhone 6)

Keybase proof

I hereby claim:

  • I am florianbachmann on github.
  • I am florianbachmann (https://keybase.io/florianbachmann) on keybase.
  • I have a public key whose fingerprint is C588 B1E7 4BDC 853F 170C 239B 72AA 611E 1716 1682

To claim this, I am signing this object:

[email protected]
Hallo Burrito-Bande,
ich möchte meine Bestellung
mit der Abholnummer:
xxxxxxx
am Montag den 22.09 um 12:30 Uhr
in Darmstadt - Havelstr. 16
bei euch stornieren!
Hallo Burrito-Bande,
ich habe den Wunsch einer Termin-Änderung.
ich kann den 12:30 Uhr Termin nicht wahrnehmen.
Ich würde gerne eine Stunde später kommen. Sonst ändert sich nichts.
Also um 13:30 Uhr am Montag den 22.09.
Meine Abholnummer:
xxxxxx

How to do codereview

Step 1: Context

Check what should have been done

Step 2: Git Changes

Check the related git commit

Step 3: Syntax Check

Check if the Dev use the right syntax and follow the styleguide

#import "UIResponder+FirstResponder.h"
//http://stackoverflow.com/a/14135456/202151
static __weak id currentFirstResponder;
@implementation UIResponder (FirstResponder)
+(id)currentFirstResponder {
currentFirstResponder = nil;
[[UIApplication sharedApplication] sendAction:@selector(findFirstResponder:) to:nil from:nil forEvent:nil];
return currentFirstResponder;
@florianbachmann
florianbachmann / 0_reuse_code.js
Created January 18, 2014 11:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// config.js
module.exports = {
dev: {
dbname: 'foo',
host: '127.0.0.1',
pass: 'bar',
port: 1223
},
prod: {
dbname: 'baz',
100 Keynote
101 Platforms State of the Union
102 Apple Design Awards
109 Painting the Future
200 Accessibility in OS X
201 Building User Interfaces for iOS 7
202 Accessibility in iOS
203 What’s New in Cocoa Touch
204 What’s New with Multitasking
205 What’s New in Cocoa