Skip to content

Instantly share code, notes, and snippets.

View glesage's full-sized avatar

Geoffroy Lesage glesage

View GitHub Profile
@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 / 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))
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 / 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:
{
@glesage
glesage / SimplifyExpressionsVisitor.java
Created May 30, 2015 17:48
SimplifyExpressionsVisitor.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package malgol.transform;
import jdk.nashorn.internal.ir.Block;
import malgol.ast.*;
import malgol.common.Operator;
import malgol.type.*;
Utility.benchmarkDB = function (next)
{
Facility = Utility.app.models.Facility;
FacilityDetail = Utility.app.models.FacilityDetail;
Driver = Utility.app.models.Driver;
DriverHour = Utility.app.models.DriverHour;
/**
@glesage
glesage / Script difference
Last active August 29, 2015 14:19
Script difference
#### Script 1 ####
mkdir -p "~/Library/MobileDevice/Provisioning Profiles"
cp profiles/* "~/Library/MobileDevice/Provisioning Profiles/"
whoami --> distiller
ls -al "~/Library/MobileDevice/Provisioning Profiles" --> -rw-r--r-- 1 distiller staff 9854 Apr 23 13:29 db11a47d-1999-4704-9e07-bf7e852e00c6.mobileprovision
whoami --> distiller
ls -al "~/Library/MobileDevice/Provisioning Profiles" --> -rw-r--r-- 1 distiller staff 9854 Apr 23 13:29 db11a47d-1999-4704-9e07-bf7e852e00c6.mobileprovision
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript">
(window.NREUM || (NREUM = {})).loader_config = {
xpid: "UgIOUFVQGwcJUFlXBwc="
};
window.NREUM || (NREUM = {}), __nr_require = function(t, e, n) {
function r(n) {
// Zipcode.json
{
"name": "Zipcode",
"base": "PersistedModel",
"properties": {
"zipcode": {
"type": "string",
"required": true,
"length": 5
}
ERROR (0:00:00.177) test_should_create_a_session
No route matches {:agent_id=>"1", :expired=>false, :ip_address=>"255.255.255.255", :controller=>"a_sessions", :action=>"/a_session"}
@ /home/jeff/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.3/lib/action_dispatch/journey/formatter.rb:39:in `generate'
/home/jeff/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:601:in `generate'
/home/jeff/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:631:in `generate'
/home/jeff/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:626:in `generate_extras'
/home/jeff/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:622:in `extra_keys'
/home/jeff/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.3/lib/action_controller/test_case.rb:189:in `assign_parameters'
/home/jeff/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.3/lib/action_control