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
<!DOCTYPE html> | |
<html> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
function randomArray(length, max) { | |
return Array.apply(null, Array(length)).map(function() { | |
return Math.round(Math.random() * max); | |
}); | |
} |
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
* iOS | |
`~/Library/Developer/CoreSimulator/Devices` - iOS simulators folder | |
`instruments -s devices` - list all runnable devices/simulators | |
`Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport` - device support dir | |
* GIT | |
`git submodule update --init --recursive` - grab submodules | |
`git branch --sort=-committerdate | tail -n 50 | xargs git branch -d` delete 50 oldest branches | |
`git checkout -t <name of remote>/test` - checkout remote branch |
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
for i in *.* ; do mv "$i" "_$i" ; done |
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
for family in UIFont.familyNames { | |
print("\(family)") | |
for name in UIFont.fontNames(forFamilyName: family) { | |
print(" - \(name)") | |
} | |
} |
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
git tag -l | xargs git tag -d | |
git fetch --tags |
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 | |
set -ex | |
# This scripts allows you to upload a binary to the iTunes Connect Store and do it for a specific app_id | |
# Because when you have multiple apps in status for download, xcodebuild upload will complain that multiple apps are in wait status | |
# Requires application loader to be installed | |
# See https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SubmittingTheApp.html | |
# Itunes Connect username & password | |
USER=bla |
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
// | |
// URLRequest.swift | |
// | |
// Created by Peter Prokop on 17/08/2017. | |
import Foundation | |
public extension URLRequest { | |
/// Returns a cURL command for a request |
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
class DefaultsManager { | |
enum Key : String { | |
case | |
AuthToken = "AuthToken", | |
AuthTokenTimestamp = "AuthTokenTimestamp" | |
} | |
class var sharedInstance : DefaultsManager { | |
struct Static { | |
static let instance : DefaultsManager = DefaultsManager() |
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/local/bin/nasm -f macho64 sum.asm && ld -macosx_version_min 10.7.0 -lSystem -o sum sum.o && ./sum | |
global start | |
section .text | |
extern _printf | |
extern _exit | |
start: |