Skip to content

Instantly share code, notes, and snippets.

View jjaffeux's full-sized avatar

Joffrey JAFFEUX jjaffeux

View GitHub Profile
@jjaffeux
jjaffeux / testcase.rb
Last active December 14, 2015 03:59
weird case with objc-keyword messages when defining singleton method
class MyView < UIView
attr_accessor :state
end
class Test
def initialize(delegate)
delegate.controllerWithValue(1, someStringValue: nil)
end
end
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev make
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz
tar -xvzf ruby-1.9.3-p327.tar.gz
cd ruby-1.9.3-p327/
./configure --prefix=/usr/local
make
make install
@jjaffeux
jjaffeux / core_midi_sample_rubymotion.rb
Created February 14, 2013 23:53
core_midi_sample_rubymotion
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
notificationProc = proc {|message, refCon|
p "MIDI Notify, messageId=#{message[0].messageID},"
}
midiNotification = Pointer.new(MIDINotification.type)
midiClient = Pointer.new(MIDIClientRef.type)
MIDIClientCreate("testcore", notificationProc, nil, midiClient)
@jjaffeux
jjaffeux / talk_rm_epita.md
Last active December 12, 2015 02:48
talk RM epita

Talk RM Epita

Application 02minutes d'attente

  • Partenariat avec 20 minutes
  • Dev seul : trois mois pour la première version
  • Tentatives précédentes avec phonegap, web mobile, titanium et Objective-C
  • Première application iOS
  • Un an d'expérience en Ruby
  • Anecdote : "La matrice"
@jjaffeux
jjaffeux / emotion.md
Last active December 12, 2015 02:28
Thoughts about a framework for rubymotion.

#Emotion

Emotion is a framework to build amazing apps for rubymotion.

#Features

Generators

@jjaffeux
jjaffeux / himedia_soap.rb
Last active December 11, 2015 23:48
himedia soap service ruby example
# gem install savon
require 'savon'
login = ''
password = ''
cloud = ''
destination = ''
client = Savon.client do
wsdl "http://vocalgateway.mediakiosque.com/ws/wsdl/HiconnectCloud.wsdl"
@jjaffeux
jjaffeux / MoodstocksSDK.podspec
Created January 21, 2013 10:44
example podspec
Pod::Spec.new do |s|
s.name = "MoodstocksSDK"
s.version = "1.0.0"
s.summary = "MoodstocksSDK..."
s.description = "MoodstocksSDK...."
s.homepage = "www.moodstocks.com"
s.license = { :type => 'a voir', :file => 'LICENSE' }
s.author = { "Moodtoscks" => "Moodtoscks team" }
s.source = { :git => 'git@github.com:jjaffeux/moodstocks-sdk-pod.git' }
s.preserve_paths = 'libmoodstocks-sdk.a'
@jjaffeux
jjaffeux / named_params.rb
Created January 18, 2013 21:55
named params rubymtion
def initWithPath(path, andMethod:method)
# Le premier paramètre est nommé par la fin de la première partie
# de la méthode, donc déjà y a pas de def f(a:b).
# Ensuite dans WithPath et andMethod ne sont que des
# noms qui ne sont pas réutilisés dans le code.
# De ce que je peux voir la syntaxe ruby2.0 :
def init_with(path: "/foo", method: :get)
@jjaffeux
jjaffeux / delegation_rubymotion.rb
Last active December 11, 2015 07:08
Event delegation rubymotion example
#example
class Request
attr_accessor :delegate
def self.initWithPath(*args, &block)
instance = allocate
instance.myInitializer(*args, &block)
instance
end
@jjaffeux
jjaffeux / pitchs_swma.md
Created November 30, 2012 18:08
Pitchs SWMA

init