Skip to content

Instantly share code, notes, and snippets.

@norio-nomura
norio-nomura / AppDelegate.m
Created October 4, 2012 02:14
How to call objc_msgSendSuper()
//
// AppDelegate.m
// CallSuperMethod
//
#import <objc/objc-runtime.h>
#import "AppDelegate.h"
@interface Superclass : NSObject
- (NSString*)a;
@mywizz
mywizz / gist:6396743
Created August 31, 2013 07:33
사파리에서 현재 열려있는 클량 게시판이나 게시물을 ClienKit에서 보는 (뻘)북마클릿
javascript:void(function(w){var%20u=w.document.location;var%20x=/bo_table=([_a-z]+)/;var%20y=/wr_id=([0-9]+)/;var%20c,a=[];if((m=x.exec(u))){c='list';a.push('board='+m[1]);}if((n=y.exec(u))){c='read';a.push('id='+n[1]);}if(c){w.location.href='clienkit://x-callback-url/'+c+'?'+a.join('&');}})(window)
@calt
calt / Tabbar.Swift
Last active June 24, 2024 22:17
UITabBar with custom height in Swift, does not work for iOS 14 or later.
// Does not work on iOS 14.0 or later, keeping the gist just for reference.
extension UITabBar {
override open func sizeThatFits(size: CGSize) -> CGSize {
super.sizeThatFits(size)
var sizeThatFits = super.sizeThatFits(size)
sizeThatFits.height = 71
return sizeThatFits
}
}
@azeier
azeier / log.config
Last active December 6, 2021 20:30
HDT log.config
[Power]
LogLevel=1
FilePrinting=True
ConsolePrinting=False
ScreenPrinting=False
Verbose=True
[Achievements]
LogLevel=1
FilePrinting=True
ConsolePrinting=False
#!/bin/sh -x ## or just ` curl -Ls http://git.io/vRozn | sh `.
## Downloads the Mac OS X 10.10 Recovery Partition update,
## Copy's over the 10.10 version of Disk Utility.app, then
## use git to apply a binary patch so it will run on 10.11+.
cd /tmp
rm -rf DU1010
mkdir DU1010
@ypujante
ypujante / fix-el-capitan-slow-time-machine-speed.plist
Created March 6, 2016 18:41
Workaround to El Capitan Slow Time Machine speed
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Copy under /Library/LaunchDaemons and issue sudo launchctl load /Library/LaunchDaemons/fix-el-capitan-slow-time-machine-speed.plist -->
<plist version="1.0">
<dict>
<key>Label</key>
<string>fix-el-capitan-slow-time-machine-speed</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/sysctl</string>
@jimmyliao
jimmyliao / Swift_Tooling.txt
Created May 5, 2016 06:46
How to change swift runtime with xcrun
export TOOLCHAINS=swift
xcrun --find swift
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-03-24-a.xctoolchain/usr/bin/swift
export PATH=/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-03-24-a.xctoolchain/usr/bin:"${PATH}"
--
export PATH=/Library/Developer/Toolchains/${swift-latest.xctoolchain}/usr/bin:"${PATH}"
@czwen
czwen / gist:567f731173b2e33add720424a3ce836e
Created July 1, 2016 07:41
inject dylib into simulator
xcrun simctl spawn booted launchctl debug system/com.apple.SpringBoard --environment DYLD_INSERT_LIBRARIES=/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib
xcrun simctl spawn booted launchctl stop com.apple.SpringBoard
@stefanbuck
stefanbuck / upload-github-release-asset.sh
Last active November 26, 2023 12:40
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner
@olragon
olragon / fix.sh
Created October 18, 2016 14:32
Install Mac OS X El Capitan on PC on VirtualBox on Ubuntu
#!/bin/bash
VM=$1
if [[ -z "$1" ]]; then
echo "Please provide your VM name."
echo " ./fix.sh \"OS X El Capitan Final\""
echo "To list your VM"
echo " VBoxManage list vms"
exit 1;
fi