Skip to content

Instantly share code, notes, and snippets.

View lacostej's full-sized avatar

Jerome Lacoste lacostej

View GitHub Profile
@lacostej
lacostej / fix_lexmark.sh
Created December 25, 2012 18:21
Fix lexmark-printer-utility-1.0-2.i386.deb
dir=tmp
rm -r $dir
mkdir $dir
dpkg -x lexmark-printer-utility-1.0-2.i386.deb $dir
dpkg-deb -e lexmark-printer-utility-1.0-2.i386.deb $dir/DEBIAN
file=$dir/usr/local/lexmark/printer_utility/etc/lxpsu.desktop
sed -e 's/\$JARVIS_VENDOR_SHORT_NAME%%/lexmark/g' $file > $file.1
mv $file.1 $file
@lacostej
lacostej / update_urls.rb
Last active November 16, 2015 16:01
iTunesConnect - Updating MarketingURL and Support URL using spaceship
require 'spaceship'
user = ...
password = ...
Spaceship.login(user, password)
Spaceship::Tunes.login(user, password)
all_apps = Spaceship::Tunes::Application.all
@lacostej
lacostej / FileSystemUtil.cs
Created March 29, 2012 09:15
Unity3d / Editor build with pre/post process operations, including code generation using antlr string template
public static IEnumerable<string> GetFiles(string path) {
Queue<string> queue = new Queue<string>();
queue.Enqueue(path);
while (queue.Count > 0) {
path = queue.Dequeue();
foreach (string subDir in Directory.GetDirectories(path)) {
queue.Enqueue(subDir);
}
string[] files = null;
files = Directory.GetFiles(path);
@lacostej
lacostej / application_loader.scpt
Created October 10, 2012 20:16
Script Application loader to send a bundle (draft)
#!/usr/bin/osascript
# a applescript app to use Application Loader to send the specified bundle to the first eligible
# application in state waiting for upload to use carefully :)
# contains a few delays because of VNC incurred delays
on run argv
set filepath to item 1 of argv
activate application "Application Loader"
tell application "System Events"
@lacostej
lacostej / gen_screenshots.rb
Last active October 8, 2015 16:06
Deliver ScreenshotGenerator
require 'fileutils'
class ScreenshotGenerator
attr_accessor :dimensions
def initialize(dimensions)
@dimensions = dimensions
end
def generate_screenshots(path, prefix, locales, device_types, colors)
@lacostej
lacostej / unity3d-1-threaddump_1.txt
Created March 3, 2012 07:58
jenkins unity3d plugin threaddumps
Mar 2, 2012 7:19:47 PM hudson.triggers.SCMTrigger$Runner run
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.4-b02-402 mixed mode):
"pool-5-thread-1386" prio=5 tid=7fec9a092000 nid=0x114947000 waiting on condition [114946000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7be06a8f0> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:196)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
@lacostej
lacostej / gist:1575395
Created January 7, 2012 17:31
Jenkins failure
Jan 7 18:26:54 WWTKs-Jenkins org.jenkins-ci[78]: hudson.util.IOException2: Unable to read /Users/Shared/Jenkins/Home/jobs/infra_jenkins_unity3d/builds/2012-01-05_11-35-30/build.xml
Jan 7 18:26:54 WWTKs-Jenkins org.jenkins-ci[78]: at hudson.XmlFile.unmarshal(XmlFile.java:160)
Jan 7 18:26:54 WWTKs-Jenkins org.jenkins-ci[78]: at hudson.model.Run.reload(Run.java:283)
Jan 7 18:26:54 WWTKs-Jenkins org.jenkins-ci[78]: at hudson.model.Run.<init>(Run.java:272)
Jan 7 18:26:54 WWTKs-Jenkins org.jenkins-ci[78]: at hudson.model.AbstractBuild.<init>(AbstractBuild.java:163)
Jan 7 18:26:54 WWTKs-Jenkins org.jenkins-ci[78]: at hudson.maven.AbstractMavenBuild.<init>(AbstractMavenBuild.java:54)
Jan 7 18:26:54 WWTKs-Jenkins org.jenkins-ci[78]: at hudson.maven.MavenModuleSetBuild.<init>(MavenModuleSetBuild.java:137)
Jan 7 18:26:54 WWTKs-Jenkins org.jenkins-ci[78]: at sun.reflect.GeneratedConstructorAccessor14.newInstance(Unknown Source)
Jan 7 18:26:54 WWTKs-Jenkins org.jenkins-ci[78]: at sun.reflect.DelegatingCon
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:lacostej/jenkins.git
[branch "master"]
remote = origin
@lacostej
lacostej / 0001-PackageApplication-still-passes-resource-rules-while.patch
Last active August 29, 2015 14:27
Patch PackageApplication from a serie of patches
From 813dee621ea00f6c42af1c4a3c459a140fd78a3b Mon Sep 17 00:00:00 2001
From: Jerome Lacoste <jerome.lacoste@gmail.com>
Date: Thu, 13 Aug 2015 14:35:57 +0200
Subject: [PATCH] PackageApplication still passes resource-rules while it is
deprecated.
See https://developer.apple.com/library/mac/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG206
---
PackageApplication4Gym | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
@lacostej
lacostej / gist:17bb57e96a1698269ad4
Created June 30, 2015 11:06
Unity PageData pattern
namespace WWTK.Server {
namespace Util {
// Immutable struct to represent a WWW GET/POST page result
public struct PageData {
private int m_StatusCode;
private string m_Text;
private Dictionary<string, string> m_Headers;
public int StatusCode { get { return m_StatusCode; } }
public string Text { get { return m_Text; } }