Skip to content

Instantly share code, notes, and snippets.

View pookjw's full-sized avatar

Jinwoo Kim pookjw

View GitHub Profile
@oaleeapp
oaleeapp / String+emoji.swift
Created December 20, 2016 16:54
Get random emoji
extension String{
static func randomEmoji()->String{
let emojiStart = 0x1F601
let ascii = emojiStart + Int(arc4random_uniform(UInt32(35)))
let emoji = UnicodeScalar(ascii)?.description
return emoji ?? "😍"
}
}
@kde713
kde713 / safepass.js
Last active February 2, 2024 08:21
국민대학교 안전교육 이수 스크립트 (2020.04.09 동작확인)
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]);
}
@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
@stefanbuck
stefanbuck / upload-github-release-asset.sh
Last active August 27, 2024 08:46
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
@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
@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}"
@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>
#!/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
@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
@calt
calt / Tabbar.Swift
Last active April 22, 2025 05:34
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
}
}