View gist:3da6240c55b7ce80f0b1a4d8cddb1ac7
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
sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g;s/.$//"` |
View profile_export.js
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
/** | |
* Export provisioning profiles with UUID + Name for better readability. | |
* Copies of the original profile with the new naming convention will be created in the current working directory | |
* usage: node profile_export.js -f path/to/profile.mobileprovision | |
* usage: node profile_export.js -d path/to/profiles/ | |
*/ | |
const path = require('path'); | |
const fs = require('fs'); | |
const exec = require('child_process').exec; |
View upload_to_crashlytics
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
exec > /tmp/upload_to_crashlytics_logfile.txt 2>&1 | |
export CODE_SIGN_KEYCHAIN=login.keychain | |
${SRCROOT}/Scripts/submit f36625510d3a31bd3a5f3372cf9a645f64846e1c b8cfc914d1a9e8356d40fc4456ebc8ec7ca90acc1e1910b046937d7caf0c101e \ | |
-releaseNotes ${SRCROOT}/Scripts/release_notes.txt | |
-groupAliases Testers \ | |
-notifications YES | |
open /tmp/upload_to_crashlytics_logfile.txt |
View regex
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
// (optionalType?.nonOptionalType)! -> optionalType!.nonOptionalType | |
// find | |
\((\w+)\?\(.\w+)\)\! | |
// replace | |
$1!$2 | |
// poorly formatted if statements |
View make_fb_messenger_app.sh
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
# run | |
# curl -o $TMPDIR/make_fb_messenger_app.sh 'https://gist.githubusercontent.com/jhildensperger/8b1e71eaf3566ec951b9/raw/52f02d049dd25a987b2cb33e092f3882fc256bab/make_fb_messenger_app.sh' && \ | |
# chmod +x $TMPDIR/make_fb_messenger_app.sh && \ | |
# $TMPDIR/make_fb_messenger_app.sh | |
#!/bin/sh | |
chromeAppPath="/Applications/Google Chrome.app" | |
chromeExecutablePath="$chromeAppPath/Contents/MacOS/Google Chrome" |
View log request
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
po [[NSString alloc] initWithFormat:@"date: %@ status: %i url: %@", [NSDate date], (int)[self.response statusCode], self.response.URL.absoluteString] |
View preintstall_hook
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
pre_install do |installer_representation| | |
aggregate_target = installer_representation.installer.aggregate_targets.detect { |target| target.name == "Pods" } | |
pods = installer_representation.pods.select { |pod| aggregate_target.pod_targets.collect(&:pod_name).include?(pod.name) } | |
pod_names = ['AFNetworking'] | |
File.open('PodHeaders.h', 'w') do |header| | |
pods.select {|pod| pod_names.include?(pod.name)}.each do |pod| | |
header.puts "\n#pragma mark - " + pod.name + "\n\n" | |
pod.source_files.select {|path| path.extname == ".h"}.each do |header_path| | |
header_file = header_path.basename.to_s | |
next if header_path =~ /Spec/ |
View .open-github-branch.bash
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
# add .open-github-branch.bash to ~/ | |
# add commented code to your ~/.bash_profile | |
# restart terminal and enjoy! | |
# | |
# if [ -f ~/.open-github-branch.bash ]; then | |
# . ~/.open-github-branch.bash | |
# fi | |
# | |
# alias gpr='__open_github_branch' |
View CAMediaTimingFunction+SwiftOut.m
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
#import "CAMediaTimingFunction+SwiftOut.h" | |
@implementation CAMediaTimingFunction (SwiftOut) | |
+ (CAMediaTimingFunction *)swiftOut | |
{ | |
CGPoint controlPoint1 = CGPointMake(0.4, 0.0); | |
CGPoint controlPoint2 = CGPointMake(0.2, 1.0); | |
return [self functionWithControlPoints:controlPoint1.x :controlPoint1.y :controlPoint2.x :controlPoint2.y]; | |
} |
NewerOlder