23 avr. 2018

Deploy an app from Gitlab's registry to Heroku (.Net Core example)

I had my ups and downs with Docker. For me, it's a great tool with pros and cons but, as I mainly use Windows for my dev. environments, making it works on the Microsoft OS can be painful.

That’s why I delegate! It's easy to find a way to make a Docker container on someone else's machine. And because I love Heroku and it’s so convenient to push a container directly to your app, I picked Gitlab (that I love too) to Dockerize my app.

The Goal

  • Dockerize an app and keep it on your Gitlab Registry (reusable at will)
  • Use the image to deploy on Heroku


Let’s Start

  • Create a simple web API in a TestApp folder
dotnet new webapi
git init
git add .
git commit -m “First Commit”
  • Create a new repo on Gitlab and copy the address (something like git@gitlab.com:****/****.git) to add it to your local repo
git remote add origin git@gitlab.com:****/****.git
  • Add a Dockerfile in your folder (change the name of the app if needed)
FROM microsoft/aspnetcore-build:2.0 AS build-env

# Copy everything and build
COPY . ./
# You can point directly at your csproj file, specially if it's on a sub-folder
# On some .Net Core projects (MVC, usually) if you don't add --runtime linux-x64, it won't publish. See note (1)
RUN dotnet publish -c Release -o out *.csproj --runtime linux-x64 

# Build runtime image
FROM microsoft/aspnetcore:2.0
COPY --from=build-env /app/out . 

# Change the name of the app here if needed (TestApp)
CMD ASPNETCORE_URLS=http://*:$PORT dotnet TestApp.dll
  • Add a .dockerignore with
  • Add a .gitlab-ci.yml file and change the information as required
  • Commit everything and push
You can go to Gitlab, on your repo page, under CI / CD > Jobs and check that everything is working fine. To do this job, Gitlab is using a Shared Runner. It’s a service that will grab your .gitlab-ci.yml file and do what it says  (more here).

That’s it! Everytime you push to your repo, you will create a new Docker image and push it to Heroku.
You can pick the branch you want to deploy on the “only” part of your gitlab-ci file.


There are many issues with precompiled Views. As of today, it’s not really solved: https://www.google.fr/search?q=net+core+razor+views+precompile&oq=net+core+razor+views+precompile

29 mai 2015

Why updates are killing you

Someone will have to pay for the time I spent watching softwares updating!

It seems totally accepted in MMO games. You want to play, you click the button, you don't have much time, "let's just have one game before going to bed"... And suddenly, the launcher tells you that a 2 Go download is required to proceed. And the bigger the download, the longer the update.

I have been using PC's for a long time now (1996 for the sake of accuracy) and if I had to keep one rule I learnd from all the crazy things I have been through, it's: "If it works, don't change it!". I used to be the geek who always tried the latest version of everything. From OS's to games, I loved watching the new features. But now, I don't like surprises anymore.
I though it was because I was getting old. And now I realize that it's mostly because I am more professional. You see, when you have to get a job done, it doesn't matter if you use the latest version or not. All you need is to get it done, and usually in a short time span. So if you need to re install half of your tools and spend time learning the differences, you are dead.

Of course you can find examples of upgrades which are pretty neat. The problem is: You are gambling with your time, productivity and sanity. Most of the time you can't go back (except by starting over).

I recently updated 2 apps on my Android Phone : 8tracks and miCoach.
8tracks was nice and it's now great! On the other hand, miCoach was OK and is just became a useless piece of code. It can't keep my settings, useful buttons are nowhere to be found, translation is crappy etc.

And if you use Airdroid once in a while like me, you can see that every time you open it, it asks to update in order to use it. And for minor fixes. It will only take a few seconds they say... So I want to get a few pictures from my phone and end up waiting for the app to update ... waiting ...

The messages here are clear:
- they want to control what you see and when you see it
- they can't release a working version without having to patch it a thousand times.

I won't even talk about Wordpress which likes to harass you until you update. Just so you realize that the layout is a mess and most of the plugins are disabled. "Yeah sorry, there was a huge security breach, but now it's fine,  I promise!".

In a production situation, it can't be.

So please, developers of the world, if you make a patch, make it worthwhile. Make sure it really helps people.

22 janv. 2015

Fast-Paced Reviews Official Launch!

This is the official launch of Fast-Paced Reviews, a blog dedicated to unusual video games and discoveries.

1982: Welcomed by Ottumwa High cheerleaders, 16 all-stars - ages 14 to 30 - gather on Main Street behind six of the top video games in the U.S.

It's the result of what I have wanted to do for a long time: reviewing games and uncovering their hidden sides. Fast-Paced Reviews is mostly about not very famous games and certainly not AAA games. Sometimes, it's just alpha or prototype versions.

I launched this blog, because I wanted to offer a new perspective on game journalism. I don't want to talk about DLC's, launch dates, pre-release, trailers, etc. I want to talk about games. Less about business and more about gameplay and innovation. Not so much about game hits but rather about pure entertainment and discovery.
Reviews are short because I don't have time to read lengthy critics so I guess there are other people who don't either. And because some games are very short, there is not much to say.

Make sure to follow us:
Facebook: https://www.facebook.com/fastpacedreviews
Twitter: https://twitter.com/FastPacedReview
Google+: https://plus.google.com/+Fastpacedreviewsmag
RSS: http://www.fastpacedreviews.com/feeds/posts/default

4 déc. 2014

A guide to create a TileMap for HaxeFlixel

When you create a TileMap in HaxeFlixel, it asks you to provide a map and some tile's graphics.
The beauty of this tool is to automatically set the layout for blocks and decide which is facing which.
So in addition to the map that can be a csv file or a black and white image converted with FlxStringUtil.imageToCSV(), you have to provide a strip containing all the tiles for every situations.

But you need to respect a precise order for FlxTilemap to understand it.
I did this visual aid to save some time. It tells which side is connected. I hope it will help others:

The tile strip comes from here: https://github.com/HaxeFlixel/flixel-demos/tree/master/Flixel%20Features/Tilemap

As you can see, the order follow some kind of pattern but I still can't wrap my head around it ...

3 sept. 2014

Faut-il boycotter JeuxVideo.com ?

Depuis quelques temps déjà, le forum de JeuxVideo.com fait l’objet de sévères critiquent pour son contenu un peu douteux et quelques fois honteux.
Bien connues des internautes avertis, les sections “15-18” et “18-25” renferment le meilleur comme le pire. Le pire aimant flirter avec la limite légale. Et puis parfois … la limite est franchie.
C’est ce qu’a souligné dans cet article une chroniqueuse du Nouvel Obs qui a pu constater qu’en parlant d’internet et de sexisme, on obtient assez vite un mélange instable.

Alors que le débat fait rage et que ça tire dans tous les sens, prenons cinq minutes pour analyser ce qui se passe.

Le messager

Même si l’article est un peu expéditif et beaucoup trop orienté, les faits présentés sont indéniables. Ce qui est bien dommage d’ailleurs puisque tous les détracteurs commencent en général par taper sur le messager et non sur le message. Une technique récurrente ces derniers temps dans le journalisme télé de la part des politiques entre autre qui n’hésitent pas à se fendre d’un “... mais faites votre travail de journaliste !”. Sous-entendu : “vous ne me posez pas les questions auxquelles j’ai envie de répondre”.
Ce qui réduit de plus en plus les journalistes à de simple porte-micros.

Je trouve le titre de l’article bien choisi parce qu’il résume à merveille la situation. Même si une partie du forum ressemble à n’importe quelle autre, une autre partie non négligeable véhicule des idées qui tombent sous le coup de la loi et personne ne fait rien (il parait qu’il y a des modérateurs).

La pensée de groupe

La principale réponse que l’on peut entendre de la part des supporters, c’est qu’il faut connaître le forum pour pouvoir critiquer. Que c’est une communauté et que si on en fait pas partie, on ne peut pas “comprendre”.
Je ne m’étalerai pas sur la pensée de groupe car je l’ai déjà fait dans un article précédent :
Mais il s’agit d’un cas d’école où chacun s’encourage à commettre la plus grosse débilité.

L’acteur principal

On sait qu’avec les moyens de communication extrêmement rapides, si il y a un problème et pas de réponses de l’intéressé, c’est un manquement énorme. Surtout de la part d’un magazine qui ne doit pas manquer de plumes pour rédiger un petit communiqué au moins pour faire patienter.
Et c’est ici le gros problème de JVcom : une passivité à toute épreuve. Les seules réponses obtenues dans le passé sont de l’ordre de : “On connaît le problème, c’est compliqué, on y réfléchit”. Ce qui peut être interprété comme une démission étant donné que les revenus générés par le trafic du forum ne doivent pas être négligeables et qu’on ne change pas une équipe qui gagne !
Bref, on attend avec impatience que JVcom se fende d’une réponse et se prenne les pieds dans le tapis.

Les modérateurs

En nommant des modérateurs parmi les volontaires tout en regardant tout ça évoluer de loin et les stats de fréquentation de près, on peut vite perdre le contrôle et commettre l’irréparable.

Une réponse apportée par un modérateur :

15/07 : Le sujet a été supprimé. Il comportait plus de 6 pages hier encore. Principalement du soutien et des encouragements. Je n’ai pas de screenshots mais je vous fais part de mon analyse malgré tout.

Arrêtons-nous un instant sur cette phrase : “Si la bêtise se porte bien sur la toile française, elle semble avoir atteint un point de non-retour dans le milieu du militantisme et donc du journalisme”.
La bêtise sur la toile française ? Les internautes vous remercient mais je crois qu’on se passera de vos analyses (la paille, la poutre). Et confondre le militantisme et le journalisme ? Vraiment ?

Déjà considérée comme une réponse ouverte et intelligente par certains, on voit encore une victime de l’effet de groupe. Et un appel à témoignage magnifique pour que chaque membre du groupe puisse renforcer cette pensée. On trouve quand même de petites fissures : “[parlant de Bla-Bla] Je suis désolé, mais 75% des sujets sont carrément affligeants.”.

D’un point de vue plus personnel, j’ai fréquenté le forum de Hardware.fr pendant de nombreuses années. La modération a toujours été impeccable. Il y a des règles claires et elles sont respectées à la lettre. Même dans les zones de discussion libre, les débats peuvent s'enflammer mais on sait qu’il n’y aura pas de débordements non-contrôlés.

La liberté d’expression

Derrière le drapeau de la liberté d’expression, on peut cacher à peu près toutes les idéologies nauséabondes. On trouve aussi l’excuse du troll qui permet de créer une zone très floue et surtout de faire avaler des couleuvres. Prétextant qu’il s’agit d’humour et de provocation, les partisans de discours orduriers n’hésitent pas à (tenter de) faire taire l’opposition par tous les moyens licites ou illicites à leur disposition : spam, harcèlement, diffusion des informations personnelles …

De même, utiliser des mots choquants ne rentre pas dans le cadre de la liberté d’expression. Le proverbe : "La liberté des uns s'arrête là où commence celle des autres" qu’on retrouve dans la Déclaration de Droits de l’Homme, rappelle qu’un mot choquant ou trollesque pour certains est blessant pour d’autres. L’utilisation à outrance des mots “pd” et “fag” montre que l’on est plus dans la liberté d’expression mais dans la liberté d’offenser.
Les retrouver en titre de topic ?

Certains prétendent que ce n’est pas pire que le bon vieux café du commerce. C’est vrai, sauf que ce n’est pas transposable. On ne peut pas parler dans un forum comme au café du commerce puisqu’on passe d’un cercle relativement privé à un espace public d’une part. Et que c’est toujours le passage à l’acte qui est pointé du doigt et non pas le medium d’autre part.


JVcom serait-il comme Dr Frankenstein réalisant qu’il a enfanté d’un monstre et qu’il a beaucoup de mal à s’en débarrasser aujourd’hui ? Car certains membres désirent clairement transformer cette communauté en un 4chan francophone.
On ne peut pas laisser ce genre de discours envahir Internet, d’abord parce que la loi doit être respectée et ensuite parce qu’il est du devoir de chacun d’œuvrer pour une société meilleure où chacun peut se sentir en paix quels que soient sa couleur, son genre, son orientation sexuelle …
Insulter des féministes (exemple au hasard) et les harceler dès qu’elles se défendent ne fait partie d’aucune liberté, d’aucun style d’humour.
Faudra-t-il faire pression sur JVcom pour obtenir une réaction officielle ?

5 mai 2014

Spec Ops : The Line - Why you should visit Dubai before it's too late

I recently played a game called "Spec Ops : The Line". I heard nice comments about the story line and it is not that usual so I was intrigued.


Where did I park?

Dubaï has been totaled by a giant apocalyptic sand storm. So the US has sent troops (many troops) to organize a rescue mission ... aaaand lost contact ...
They decide to send 3 guys from the Delta Force to scout around. And that's you!
I quickly found the HUGE reference to "Apocalypse Now". It could have been called "Apocalypse Now: the game" actually. It's a travel into human madness : the deeper you go, the more horrific it gets. And you also realize that you're gonna have to eliminate the Colonel of the rescue mission who is an old buddy. And you also have a rock soundtrack all along.



Quickly, you sanity is gonna be challenged by the weird things you discover. And your two pals questioning your authority is not helping (you know, like in the movie...). As you go through the game, the 3 of you start wondering why you are killing those poor bastards. And the main reason is that they are SHOOTING AT YOU! (omg) And because you don't know why they do that, it becomes more stressful. Suddenly, you find yourself killing hundreds of guys, and for me, that's the biggest problem of the game. The A.I. is not great so you often kill guys who haven't fired once. I was in "normal" difficulty and found myself several times stuck in tricky situations. But, I'm no PGM and I could empty a room with 4 head shots in a row. "Rainbow Six: Vegas" is one of my favorite game and has similarities to this one (for the gameplay, not the story) so I used it as a reference. I would have loved fewer but stronger enemies. And also, when you are a sniper, taking cover IS mandatory. Vegas is from 2006 and enemies knew how to hide, take cover and be sneaky.
Anyway, you wipe those guys and wonder. And because there is only one end, the choices you have to make have no impact on the story, only on your conscience.


Am I a party pooper?

The underlying question of this game is: Is a military intervention a good idea?
By choosing the US army and a Middle-East country, you quickly think about how things happened in Kabul or Baghdad. Sometimes you have to make decisions while you don't have all the info in hand and it leads to terrible results. And when you are a foreign force, it's even more difficult.
In this game, you kill civilians just because they were in your line of fire, you destroy the water supply to win a fight, you try to stop an ugly situation but the retaliations create much more casualties among friends and civilians...
"With great power, comes great responsibilities". And in this case, you still try to blame someone else but the blame is on you. Even when you think that you're doing this for the sake of humanity.


Let's scavenge for some Champagne and Caviar!

I liked the survival aspect. And the fact that you are limited in ammo is great for that. For time to time, you find yourself with zero bullets and you have to pick up any weapon on the floor to stay alive. But speaking of survival, why oh why did they follow this stupid trend where you don't have to care about your health. When you take a bullet, you just have to wait a few seconds and you feel better! I know that it can't be realistic or every bullet would be a one way ticket to the nearest hospital. But I liked my med packs. At least, you could pretend you stopped the bleeding.
A lot has been said about the controls not responding. It didn't really bother me even if it's obviously not very smooth.
The soundtrack is really great, it's not every day that you hear Mogwai in a game.
Interactions with the environment are limited and not really well included. It's sad because there were lots of potential and the few nice ideas are not enough. It's like "Now stop: you need to break this glass to drown the enemies in sand".


Zip-line bare handed... because you are Delta Force for Christ sake!!!

This game is a bit short and you don't really have options. Like in "Apocalypse Now" where they sail back up the river and can't really leave the boat, you just have to walk straight forward. But because it's a video game, a little bit more of interactions would have been great.
The landscape is incredible and graphics are amazing. The not-really-clear story adds to the total mess of the situation and leaves you wondering. And it's a good thing for a video game.

Follow me: @tmalicet

17 avr. 2014

The art of misleading: when wrong information is better than no information

From xkcd.com
I stumbled upon two charts in twitter recently and found a funny link between them.

The first is obvious. And Business Insider did a nice comment on it with a corrected version.
It sounds like Michael Scott's negotiation technique to speak indistinctly to make your interlocutor uncomfortable. You just take people's reading habit and use it against them.

The second is an attempt to respond to the eternal question, no, not the meaning of life but: "What is the best programming language?"
And when thousands of people try to make stats and graphs about it to show the trends and comfort developers in their choices, the conclusion is always the same. There is different languages for different means.
The sad part here? You often miss good information because someone decided to make numbers tell a story. More than report facts.
This one does not show anything mostly because it's in %. But also because it doesn't show new memberships nor the total of new repositories for each year (and its increase).
When looking at this, you could assume that, for some reason, Java and JS devs found Github more appealing over the years and decided to join and commit. Which led other languages' share to decrease. Why not?

A lot more is said here, when someone tried to pull some data from Github archives and realized it could be completely false for a hundred reasons. Comments are really instructive! Commentators state that some languages are not well detected by Github... Perl for instance. *Looking at the graph* Awwww

This post is more a rant about twitter than anything. I like twitter because some time it makes me laugh. But I don't rely on it for information. I have my RSS feeds for that.
And when I see that everything needs to be done in a instant (read, comment, retweet ... go back to step one) it's obvious that bad information can be spread all over the world very quickly.
We don't take the time to look closer.

25 mars 2014

Why you should not go to OVH

OVH is a hosting company founded in France and it is now taking over the World.
It became famous by offering some cheap domains and easy-to-setup shared hosts. It was a "by devs for devs" offer and it was great ... aaaah back in the days!
I think I opened my account in 2006 and it was the Golden Age. Accessing your website was fast. The admin panel was slow but offered so much possibilities compared to competitors.

Your website? HERE it is!
Eight years later the admin panel hasn't changed (pff, what's 8 years on internet). They just added a few button but it's still sloooooooowww (imagine me typing in slow motion). And for a few years, hosting something like a Worpress site/blog gives you the opportunity to bang your head on the keyboard.

While they are getting better at marketing, show the big-ass data centers they are building everywhere and offer more and more kinds of services, the shared and dedicated hosting offer is suffering. The hotline, when it answers, seems at best drunk.

Anyway, I just saw an interesting fact. While launching in US, they don't offer shared hosting: http://www.ovh.com/us/index.xml
And of course, no start offer for dev/test purpose.

So if you have any good host company to suggest, please post that in the comments. The Cloud Paas's can show limits sometime. (even if I love Heroku!)


10 mars 2014

How to add a new snippet for Zed?

Following this introduction to Zed, I encountered a problem to create a snippet. It's actually an open issue.
So I wanted to share it here.

I also wanted to share a few things I added to my user.json file. It's also a good idea to back it up as you could use it in any chrome browser you could find.
    "preferences": {
        "theme": "monokai",
        "scrollSpeed": 4,
        "gotoExclude": ["/tags", "*.png", "*.gif", "*.jpg", "*.mp4"]
In the exclude part,  I added a few extensions that I encounter while working on web projects. It saves some time when you look for a file with the Ctrl-E command.
I also added the ctp extension (from CakePHP) to be managed with the PHP mode.

Here is an example if you want to use Zed snippets system with PHP :
    "modes": {      
        "php": {
            "name": "PHP",
            "highlighter": "ace/mode/php",
            "extensions": ["php", "php4", "ctp"],
            "commands": {
                "Tools:Complete:Snippet": {
                    "scriptUrl": "/default/command/snippet_completer.js",
                    "snippets": {
                        "class": "class=\"${1}\"",
                        "foreach": "foreach (${1} as ${2}) {\n\t${3}\n}",
                        "if": "if (${1}) {\n\t${2}\n}",
                        "php": "<?php ${1} ?>"
            "handlers": {
                "complete": ["Tools:Complete:Builtin","Tools:Complete:Snippet"]
If you want to add your own, just duplicate the lines under snippets.

18 févr. 2014

Deploy to your FTP through BitBucket ... and soon Github

Update - August 2016
FTPbucket is a PHP script that enables you to sync your BitBucket or GitHub repository with any web-server. It works with Git and Mercurial.

This post is outdated. Please go directly to Github to find the latest informations.

FTPbucket is a PHP script that enables you to sync your BitBucket repository with any FTP account.

I was looking for an easy solution to use Git on a webproject with a server with no Git installed (hehe). After checking several solutions, I could not find a free one that could fits my needs.

So :


  • Get the code here
  • Edit the config file and rename it to 'config.php'
  • Copy the deploy folder on your FTP server
  • On Bitbucket>Admin>Hooks, setup a POST hook pointing to http://myserver/deploy/deploy.php
  • You can Push now!


  1. The script only copies the files you are pushing. It means that if you start with this tool when you already have files in your BitBucket repo, they won't be copied on the server. I'm looking for solutions on a full deploy. Which brings me the second point.
  2. I tried to push a 160Mo repo with more than 26 000 files and the POST hook didn't like it. The limit is ~1000 files/push I think. It's an unsolved issue: https://bitbucket.org/site/master/issue/7439/git-post-commit-hook-payloads-has-empty
SOLUTION : When you create a new repo on BB and need to push a lot of files, just do it. Right after, you set up the POST hook and manually copy the repo and FTPbucket files on your FTP.


It should work with Mercurial too but it's not tested yet.

I'm sure a lot of improvements can be made to my code so don't hesitate to fork and improve it! I would be glad to hear about your tests and issues too.


I would like to have a simple GUI to manage logs and configs
I need to implement a way to call for action, when the file copy is done. A post-commit hook.
Add support for SSH, Github and more ...

12 févr. 2014

If you want to get more serious/playfull, get Zed!

Zed is a code editor based on ACE.
The idea is to get a really strong IDE but with a minimalistic UI. And I really like that. I often work with PHPDesigner as I like the holding-your-hand way of doing things.
But sometimes, it's really too much. And it feels like there is an awful lot of wasted space in that kind of tools. The success of code editors based on ACE or with similar looks (Sublime Text) shows the need for such simplicity.

An open project with the 'Project Picker' in the front

I forgot the other good news, you don't need to install anything because it's a Chrome extension: Give it a try

The 'Cheatsheet' will display on many occasions and it's a good kick-starter. Or you can click on 'Manual' to get to it.


As it can be a little bit disturbing at first, I will show you how to change the theme (syntax highlights).

  • Click on 'Configuration'
  • Press 'Ctrl-E' to open a file from this project
  • Type 'user.json' then press 'Enter'. The skeleton is there but it's empty
  • Now 'Ctrl-2' to split the screen in 2 (I like the Ctrl-1-2-3 commands to split the screen as it reminds me of RTS games when you make your teams)
  • On the new window, open 'preferences.json'
As the latest is Read-Only, you need to copy the things you want to change in the 'user.json' window. Like this :
To find the one that suits you, you can try them here.


On the GitHub repo, you can find a lot of files explaining ALL you need to know about Zed but it really needs a Wiki to centralize all that!

Anyway, it's really fun to code with it. It can be challenging to a beginner but it's also a cool way to learn.

Next step: I will try to work on a Dropbox folder and set up an automatic sync with a FTP account.

24 janv. 2014

Setting up a git server like a Paas

I have this new server that I wanted to use like the services offered by Paas's. After some disappointments with OpenShift and Appfog, I am now using Heroku. And I really love like it! On Heroku, you just Push with Git and your site is up-to-date.

So, until I had to install my own Git server, I never made the difference between the bare repository and the working tree.

Just to make things clear, the bare repo does not contain files, it's just the information about who did what on which file. It's the center/server of your git network. More details here
All the files you have on your repo are a working tree. You can't push to a working tree.

But if you can easily find free server services (Assembla, Bitbucket), it's not a deploy option like in Heroku.
If you are working on a web project, you would like to check the result "live" without having to update it manually.

This is what I did :
1. I installed git on the server
(yum or apt-get or ...) install git-core
2. I created a git user
adduser git 
It will set the new user with no password or '!!'. It may cause problems, so to be sure you can unlock the user
passwd -u git
3. I had to register my SSH key (switching to 'git' user is really important)
su - git
mkdir .ssh
ssh-keygen -q -t rsa -N 'pass' -f ~/.ssh/id_rsa
# on CentOS you may need to 'exec ssh-agent bash' to avoid the 'Could not open a connection to your authentication agent.'

cat .ssh/id_rsa.pub >> .ssh/authorized_keys 
4. I did the work tree in a web-browser-accessible folder (public_html, www ...) and put a test file to avoid any bug related to cloning an empty repo
git init deploy
cd deploy
touch test
git add .
git commit -m 'first'
5. Now the bare repo. You should put in your /home/git folder
git clone --bare /home/user/www/deploy deploy.git
6. To clone it on my PC, I append my own SSH public key to .ssh/authorized_keys ...
#On the server
cat /tmp/id_rsa.pub >> .ssh/authorized_keys
You can also copy the content of your id_rsa.pub and paste with
nano authorized_keys
7. ... and cloned the repo on my machine
git clone git@myserver:/home/git/test.git
If you change your code and Push it, it will work but you won't change the deploy folder

8. I had a hook to the bare repo to tell update the live version
cd /home/git/deploy.git/hooks
touch post-receive
nano post-receive
GIT_WORK_TREE=/home/user/public_html/deploy/ git checkout -f
 Save and exit, then make it executable
chmod +x post-receive
9. Done! You can push and it will appear on the web folder

22 juil. 2013

OpenFL : Embedding a MovieClip with timeline

With the latest versions of OpenFL, the Assets Class works great but if you use it for a swf containing a MovieClip with a timeline, you can't use your mc properly (currentFrame, totalFrames ... does not work).

Has it took me a lot of time to figure it out, I'm copying here a solution that I found from the creator himself : http://www.openfl.org/forums/general-discussion/openfl-problems-swf/

The trick is to put
<haxeflag name="-swf-lib" value="path/to/your.swf" if="flash" />
in your build file.
Then, you can use it like this :
import MovieClipName;
var mc = new MovieClipName(); 

With HaXe and FlashDevelop, it's somehow easier as you can right-click on your lib and select "Add to library ..." and it will change the build command for you.

15 juil. 2013

Using FlashDevelop with Openfl

Just to make things clear, OpenFL is the sequel of NME. NME is working great with HaXe 2 and latest versions of FD but if you want to make FD, HaXe and OpenFL working hand in hand this is the trick :

  1. Install HaXe and Neko http://haxe.org/download
  2. Install the latest beta version of FlashDevelop http://www.flashdevelop.org/community/viewtopic.php?f=9&t=3529 It's 4.4.3 right now.
  3. You need to tell FD where the hell is HaXe. Go in Tools>Program Settings. Under HaxeContext, you have Installed SDKs. Click on the 3 dots
  4. Click Add and on the Path field, add the path to your HaXe install folder (might be something like C:\HaxeToolkit\haxe)
  5. Now you can build HaXe projects. To install OpenFL, I'm using haxelib. So open the Command Prompt. You can even do it from FD!
  6. Make sure you have a lib folder in your HaXe folder and type haxelib install openfl. Then haxelib run openfl setup. It might needs other libraries: haxelib install actuate, haxe install swf.
  7. Now you can go to Project>New Project... Under the HaXe section, you pick OpenFL project
  8. Press F5 to test and BOOM, it WORKS! (I sincerely wish it)