Skip to content

Instantly share code, notes, and snippets.

View Limon-O-O's full-sized avatar
🍋

Limon Limon-O-O

🍋
View GitHub Profile
@Limon-O-O
Limon-O-O / FCPrivateBatteryStatus.m
Created March 20, 2016 16:35
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);
@Limon-O-O
Limon-O-O / xcode-auto-version.sh
Created June 27, 2016 06:36 — forked from tpinto/xcode-auto-version.sh
Xcode: Automatic version and build number for iOS apps on Info.plist and Settings.bundle - http://www.tiagopinto.pt/blog/2014/11/10/xcode-version-build-number-ios-info-plist-settings-bundle/
# Tips from: http://xcodehelp.blogspot.ie/2012/05/add-version-number-to-settings-screen.html
# Reference from: https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html
# Get the correct path for the git binary
git=`sh /etc/profile; which git`
# Save paths for the project and target Info.plist
projectPlistPath="${PROJECT_DIR}/${INFOPLIST_FILE}"
targetPlistPath="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
@Limon-O-O
Limon-O-O / movietransitions.swift
Created July 24, 2016 15:07 — forked from SheffieldKevin/movietransitions.swift
Make a movie with transitions with AVFoundation and swift
//
// main.swift
// mutablecomposition
//
// Created by Kevin Meaney on 24/08/2015.
// Copyright (c) 2015 Kevin Meaney. All rights reserved.
//
import Foundation
@Limon-O-O
Limon-O-O / README.md
Created August 17, 2017 19:54 — forked from JamesMenetrey/README.md
Install Oh-My-Zsh + iTerm2 with Solarized + System-wide console in 2017 (macOS)

Install iTerm2 with Solarized in 2017

Here is the looks and feel of your terminal once the tutorial has been applied on your system:

Install iTerm2

Using Homebrew:

@Limon-O-O
Limon-O-O / update_build_number.sh
Created September 28, 2020 09:29 — forked from airdrummingfool/update_build_number.sh
Update current Xcode target's build number with the number of commits on a specified branch. http://tgoode.com/2014/06/05/sensible-way-increment-bundle-version-cfbundleversion-xcode/
#!/bin/bash
# update_build_number.sh
# Usage: `update_build_number.sh [branch]`
# Run this script after the 'Copy Bundle Resources' build phase
# Ref: http://tgoode.com/2014/06/05/sensible-way-increment-bundle-version-cfbundleversion-xcode/
branch=${1:-'master'}
buildNumber=$(expr $(git rev-list $branch --count) - $(git rev-list HEAD..$branch --count))
echo "Updating build number to $buildNumber using branch '$branch'."