This file contains 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
command alias objc expression -l objc -O -- | |
command regex swift 's#(.+)#expression -l Swift -O -- defer { CATransaction.flush() }; %1#' | |
breakpoint set -n AppDelegate.application --one-shot true --auto-continue true | |
breakpoint command add | |
swift import Foundation | |
swift import UIKit | |
swift import MyApp_tvOS | |
swift import MyApp_iOS | |
swift func $printSubviews(of view: UIView) { print(view.perform("recursiveDescription")!) } |
This file contains 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 --set testing list | grep Booted | grep Clone | sed 's/^.*(\([A-Z0-9\-]*\)).*$/\1/g' | xargs -I {} xcrun simctl --set testing shutdown "{}" |
This file contains 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
$0.29 | |
$0.39 | |
$0.49 | |
$0.59 | |
$0.69 | |
$0.79 | |
$0.89 | |
$0.90 | |
$0.95 | |
$0.99 |
This file contains 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
// | |
// SoundPlayer.swift | |
// SoundPlayer | |
// | |
// Created by Max Chuquimia on 16/06/2016. | |
// | |
import Foundation | |
import AVFoundation |
This file contains 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
// | |
// Final implementation, as described in | |
// http://nspasteboard.com/2016/10/23/decoding-asn1-der-sequences-in-swift/ | |
// | |
import Foundation | |
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
// Implementation (required) | |
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
This file contains 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"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0.794852 1 0.923414 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Courier - 13.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>1 0.93397 0.612968 1</string> |
This file contains 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
cat skype_export.json | jq -r '.conversations[] | select(.displayName != null) | select(.displayName | contains("PEER NAME HERE")) | .MessageList[] | select(.messagetype == "Event/Call") | .content' | grep 'ended' | sed -e 's/^.*callId="\([^"]*\)".*<duration>\(.*\)<\/d.*$/\1 \2/g' | uniq | sed 's/^.* \(.*\)$/\1/g' | awk '{ SUM += $1} END { printf "%.2f", SUM }' |
This file contains 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 URLRequest { | |
func curlString() -> String { | |
var curl = "curl --insecure" | |
// Method | |
if let method = httpMethod { | |
curl += " -X \(method)" | |
} |
This file contains 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
grep -rlZE "(UI[a-zA-Z]*View|CG[A-Za-z]*)" --include "*.swift" --exclude-dir Pods . | tr '\n' '\0' | xargs -0 grep -LZ "^import UIKit" |
This file contains 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 {0..999}; do i=$(printf "%03d" $i); echo -en " Downloading $i\r"; curl -s --fail "<url>/segment_$i.ts" >> /tmp/test.ts || break; done |
NewerOlder