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
#!/usr/bin/ruby | |
# | |
# create a pull request for current branch | |
# | |
# configure | |
# create a github token | |
# https://github.com/settings/applications#personal-access-tokens | |
# export GITHUB_TOKEN="xx" | |
# export GITHUB_USER="huguesbr" | |
# export GITHUB_REPO="xx/yy" (optional, otherwise use origin url) |
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
#!/usr/bin/ruby | |
# | |
# create a pull request for current branch | |
# | |
# configure | |
# create a github token | |
# https://github.com/settings/applications#personal-access-tokens | |
# export GITHUB_TOKEN="xx" | |
# export GITHUB_USER="huguesbr" | |
# export GITHUB_REPO="xx/yy" (optional, otherwise use origin url) |
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 list devices | grep -v '^[-=]' | cut -d "(" -f2 | cut -d ")" -f1 | xargs -I {} xcrun simctl delete "{}" |
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
#!/bin/ruby | |
# import data from keen to keen | |
# can also delete data from source | |
require 'keen' | |
require 'awesome_print' | |
require 'active_support/core_ext' | |
require 'i18n' |
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
{ |
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
# generate SSL CSR | |
openssl req -new -newkey rsa:2048 -nodes -out request.csr -keyout private.key -subj "/C=FR/ST=Region/L=City/O=Company Name/CN=www.domain.com" |
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
curl -X POST \ | |
-H "X-Parse-Application-Id: $PARSE_APP_ID" \ | |
-H "X-Parse-Master-Key: $PARSE_MASTER_KEY" \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"where": {}, | |
"data": { | |
"title": "Title", | |
"alert": "Message" |
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
// | |
// XCTestExpectationExtensions.swift | |
// | |
// Created by Hugues Bernet-Rollande on 7/4/16. | |
// | |
import XCTest | |
extension XCTestExpectation { | |
private class IntWrapper { |
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 Foundation | |
var a: Double = 3 | |
var aSquared: Double { | |
get { | |
return pow(a, 2) | |
} | |
set { | |
a = sqrt(newValue) | |
} |
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 Foundation | |
import XCTest | |
extension Array { | |
func groupedByA<Key: Hashable>(mappingClosure: (Element) -> Key?) -> [Key: [Element]] { | |
return reduce([:]) { (groupedBy, element) in | |
guard let key = mappingClosure(element) else { | |
return groupedBy | |
} | |
var groupedBy = groupedBy |
OlderNewer