Skip to content

Instantly share code, notes, and snippets.

View glesage's full-sized avatar

Geoffroy Lesage glesage

View GitHub Profile
@glesage
glesage / test3.c
Created May 30, 2015 17:50
test3.c
#include <stdio.h>
int f(int a, int b_b)
{
int answer;
{
if (b_b) goto L_if_true1;
goto L_if_false2;
L_if_true1:
{
Ld /Users/distiller/Library/Developer/Xcode/DerivedData/Starchup_White_Label-gqeehjdrdymmlkexbonipxuctfhl/Build/Intermediates/Starchup\ White\ Label.build/Release-iphoneos/Testing.build/Objects-normal/arm64/Starchup\ Testing normal arm64
cd "/Users/distiller/customer-ios/Starchup White Label"
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode-6.1.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-6.1.1.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode-6.1.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode-6.1.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -L/Users/distiller/Library/Developer/Xcode/DerivedData/Starchup_White_Label-gqeehjdrdymmlkexbonipxuctfhl/Build/Products/Release-iphoneos -L/Users/distiller/customer-ios/Starchup\ White\ Label/Pods/Braintree/Braintree/PayPal/mSDK -L/User
@glesage
glesage / pre-commit
Last active August 29, 2015 14:23
Starchup iOS Pre commit hook
#!/bin/sh
PROJECT_DIR=`pwd`
PROJECT_NAME=`basename $PROJECT_DIR`
PLIST="${PROJECT_DIR}/${PROJECT_NAME}/Config/Info.plist"
if [ `git rev-parse --abbrev-ref HEAD` == "dev" ];
then
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PLIST}")
buildNumber=$(($buildNumber + 1))
@glesage
glesage / pre-commit
Last active August 29, 2015 14:23
Starchup iOS Pre commit hook for customer apps
#!/bin/sh
PROJECT_DIR=`pwd`
PLIST="${PROJECT_DIR}/Starchup White Label/Starchup White Label/Info.plist"
if [ `git rev-parse --abbrev-ref HEAD` == "dev_whitelabel" ] || [ `git rev-parse --abbrev-ref HEAD` == "dev_marketplace" ];
then
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PLIST}")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PLIST}"
@glesage
glesage / gist:9d5d94add51a363cf539
Created June 17, 2015 04:42
Change all fonts except Gizmo to Proxima Nova
var doc = context.document;
var page = [doc currentPage];
var layers = [page children];
var font_name = "Proxima Nova";
function check_layer(layer)
{
if (!layer) return;
@glesage
glesage / gist:ba18f096f04fd7e52659
Created June 18, 2015 00:51
Xcodebuild 6.3.1 error
xcodebuild[1851:5382] [MT] iPhoneSimulator: SimVerifier returned: Error Domain=NSPOSIXErrorDomain Code=53 "Simulator verification failed." UserInfo=0x7fca3a5199a0 {NSLocalizedFailureReason=A connection to the simulator verification service could not be established., NSLocalizedRecoverySuggestion=Ensure that Xcode.app is installed on a volume with ownership enabled., NSLocalizedDescription=Simulator verification failed.}
01:22:33] Using gulpfile ~/Desktop/Starchup/sites/dashboard-v2/gulpfile.js
[01:22:33] Starting 'scripts'...
[01:22:33] Starting 'styles'...
index.config.js
✖ line 2 [stdin]:2:11: error: reserved word 'function'
.config(function($logProvider) {})
^^^^^^^^
✖ 1 error
function getCookie(cookie){
var cookies = document.cookie.split(';');
var theCookie;
//loops through cookie finding the desired one
for (var x = 0; x < cookies.length; x++){
if (cookies[x].substring(0,cookies[x].indexOf('=')).indexOf(cookie) !== -1){
theCookie = cookies[x];
break;
}
@glesage
glesage / admin run script
Created August 16, 2015 19:53
admin run script
#!/bin/bash
# Admin run script
# Refresh bash environment
if [ "$(uname)" == "Darwin" ]; then
echo 'Mac: Refreshing ~/.bash_profile'
. ~/.bash_profile
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
echo 'Linux: Refreshing ~/.bashrc'
. ~/.bashrc
@glesage
glesage / providers.m
Last active August 29, 2015 14:28
branch providers
UIActivityItemProvider *itemProvider = [Branch getBranchActivityItemWithParams:params
feature:@"invite"
stage:@"logged_in"
tags:@[@"ios"]];
// VS //
AmbassadorProvider *activityItem = [[AmbassadorProvider alloc] initWithPlaceholderItem:@"Free laundry from Starchup!"];