Skip to content

Instantly share code, notes, and snippets.

@jeanlaurent
jeanlaurent / .editorconfig
Last active August 29, 2015 13:56
Generic EditorConfig
[*]
indent_style = space
indent_size = 2
charset = utf-8
# following two lines are not supported in intellij
end_of_line = lf
trim_trailing_whitespace = true
[*.coffee]
@jeanlaurent
jeanlaurent / gist:8827501
Last active August 29, 2015 13:56
Mobile Platform
  • Unity http://unity3d.com/ :

    • price : 1500$ or 75$/month
    • language : unityscript (js) or c#
    • platforms : desktop, win, ios, android
    • good : 3D (don't need it), 2D, very complete, tooling
    • bad : expensive, cumbersome, learning curve, maybe too big for what I need
  • Corona http://coronalabs.com/:

    • price : 16$/month, 50$/month or 79$/month
    • language : Lua
@jeanlaurent
jeanlaurent / codestory
Last active August 29, 2015 13:57
CodeStory command
#!/bin/bash
# clone http-archetype and `mvn install` it, first
# copy and install in your ~/bin directory
function checkError {
if [ "$?" -ne 0 ]; then
display $1
exit 1
fi
}
@jeanlaurent
jeanlaurent / gist:9560069
Created March 15, 2014 00:43
Image "Magick"
# Extract the alpha channel of an image, push everything below 60% to 100% transparency, and add a 4 pixel black border around it.
convert y.png -alpha extract -threshold 60% -bordercolor black -border 4 y-mask.png
@jeanlaurent
jeanlaurent / generateIosAndAndroidIcons.sh
Last active August 29, 2015 13:59
generate icons for ios & android
#!/bin/sh
# Generate ios and android icon out of a single icon.
# source should be 1024x1024 at least.
# need imagemagick in the path
source=$1
target=$2
if [[ -z "$1" ]]
then

Old way which doesn't really work

  boot2docker down
  vboxmanage modifyvm boot2docker-vm --natpf1 "http,tcp,127.0.0.1,27017,,27017"
  boot2docker up
  docker build -t jlmongo2 .
  docker run -d --name mongo2 -p 27017:27017 -t jlmongo2

boot2docker ip

- (int) add:(NSString *)numbers
{
int myResult;
NSString *delimiteur;
if(![numbers isEqualToString:@""] && [[numbers substringToIndex:2] isEqualToString:@"//"])
{
delimiteur = [numbers substringWithRange:NSMakeRange(2, 1)];
numbers = [numbers stringByReplacingOccurrencesOfString:[NSString stringWithFormat:@"//%@\n", delimiteur] withString:@""];
}
@jeanlaurent
jeanlaurent / gist:c48eec6aabdc2081f33d
Created July 27, 2014 09:31
concat image in sprite sheet vertically
montage custom-sources/capital/data/shapes/4x/E-[1-4]@4x.png -tile 1x4 -geometry +0+0 out.png
@jeanlaurent
jeanlaurent / animonstart.html
Created March 13, 2015 15:28
Simple opacity css3 animation on start
<html>
<head>
<title></title>
<style>
@keyframes showup {
0% { opacity:0; }
100% { opacity:1; }
}
@jeanlaurent
jeanlaurent / minecraft-modding-devoxx4kids.md
Last active August 29, 2015 14:18
MineCraft Modding @ Devoxx4Kids

Minecraft Modding

Démarrez Minecraft

Vérifier que tout marche bien

Appuyer sur a touche T puis taper /js 1+2 L'écran doit afficher le résultat 3