This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension String{ | |
static func randomEmoji()->String{ | |
let emojiStart = 0x1F601 | |
let ascii = emojiStart + Int(arc4random_uniform(UInt32(35))) | |
let emoji = UnicodeScalar(ascii)?.description | |
return emoji ?? "😍" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const INTERVAL = 10000; | |
var getQueryVariable = function (key) { | |
let query = window.location.search.substring(1); | |
let vars = query.split('&'); | |
for (let i = 0; i < vars.length; i++) { | |
let pair = vars[i].split('='); | |
if (decodeURIComponent(pair[0]) == key) { | |
return decodeURIComponent(pair[1]); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Author: Stefan Buck | |
# License: MIT | |
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447 | |
# | |
# | |
# This script accepts the following parameters: | |
# | |
# * owner |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Power] | |
LogLevel=1 | |
FilePrinting=True | |
ConsolePrinting=False | |
ScreenPrinting=False | |
Verbose=True | |
[Achievements] | |
LogLevel=1 | |
FilePrinting=True | |
ConsolePrinting=False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
} | |
} |