Skip to content

Instantly share code, notes, and snippets.

View huguesbr's full-sized avatar

Hugues Bernet-Rollande huguesbr

View GitHub Profile
#!/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'
@huguesbr
huguesbr / fix-issue.rb
Last active August 29, 2015 14:07
Create a branch friendly named after a github issue
#!/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)
@huguesbr
huguesbr / prepare-commit-msg
Created October 7, 2014 04:39
Git Hook - prepare-commit-msg - auto suffix commit message with issue id
#!/usr/bin/ruby
#
# Called by "git commit" with the
# name of the file that has the
# commit message, followed by
# the description of the commit
# message's source. The hook's
# purpose is to edit the commit
# message file. If the hook fails
# with a non-zero status,
@huguesbr
huguesbr / pull-request.rb
Last active August 29, 2015 14:07
create a pull request based on an issue number
#!/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)
@huguesbr
huguesbr / iOSSimDeleteAll.sh
Created October 13, 2015 07:27
Delete all iOS Simulator
xcrun simctl list devices | grep -v '^[-=]' | cut -d "(" -f2 | cut -d ")" -f1 | xargs -I {} xcrun simctl delete "{}"
@huguesbr
huguesbr / gist.sh
Created March 9, 2016 10:50
update and fix node.js
{
@huguesbr
huguesbr / generate_csr.sh
Created March 9, 2016 10:57
Generate a SSL CSR using open ssl
# 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"
@huguesbr
huguesbr / parse_push.sh
Created March 9, 2016 10:59
Send a Push Notification using Parse Server
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"
@huguesbr
huguesbr / NSDataExtensions.swift
Last active July 18, 2019 08:10 — forked from tanner0101/NSDataExtensions.swift
Convert to and from NSData for common Swift types. Includes Eddystone URL conversion.
//
// NSDataExtensions.swift
// MAPO
//
// Created by Hugues Bernet-Rollande on 21/3/16.
// Copyright © 2016 WB Technologies. All rights reserved.
//
import Foundation
@huguesbr
huguesbr / XCTestExpectationExtensions.swift
Last active April 8, 2016 09:29
Simple extension on XCTestExpectation to allow to specify an expectation count. see following test for exemple
//
// XCTestExpectationExtensions.swift
//
// Created by Hugues Bernet-Rollande on 7/4/16.
//
import XCTest
extension XCTestExpectation {
private class IntWrapper {