Code By
Lucas Mouilleron

An Open Source selection - 40 projects
Private repositories are not fully showcased for obvious reasons :)

+ simpleWebFolder

PHP 92.4% - CSS 7.6%
Last update : 04/12/2018 - 08:04

A simple web folder.
For Apache web servers.

Screenshot

Features

  • List files and folders
  • Nice layout
  • Password protection:
    • drop a .password file containing the deisred password in folders (and subfolders) you want to protect
    • drop a .nopassword file in folders (and subfolders) you want to deprotect (in case of protected parent)
  • Download folder as a zip
  • Shares: expiration, path obfuscation, tracking
  • README.md files in folders are interpreted and displayed on top

Install

  • Requires PHP 5+, Apache 2.4+
  • cd _sf;composer install
  • Drop the _sf folder in the root folder
  • Drop the _sf_assets folder in the root folder
  • Create the _sf_shares folders for shares to be activated
  • Drop the .htaccess file in the root folder

Customisation

  • Don't edit files in /_sf
  • Create /_sf_overrides folder
    • Create config.php and override configs defined in _sf/config.php
    • Create style.css and override styles

TODO

  • Clean shares
  • Python ?

+ TCTBlog

Last update : 17/01/2018 - 13:28
  • Everything is in gh-pages branch
  • Needed for github pages publication
  • To edit the blog, switch to gh-pages branch

+ httpBin

Python 68.5% - HTML 31.5%
Last update : 13/07/2017 - 08:13

Screenshot

HTTP Client Testing Service.

Fork of http://httpbin.org.

Install

  • pip install -r requirements.txt

Run

  • cd .
  • gunicorn -b localhost:8080 httpbin:app

+ PythonScriptLauncher

Python 100%
Last update : 22/08/2016 - 13:18

PSL : A simple python script launcher with global params overridance.

Screenshot

Concept

  • It happens you need to run some scripts in a row
  • It happens as well you need to run a script with different params contexts
  • PSL allows to launch scripts and externally override global params
  • In a script, lib.PSLUpdateGlobalsFromEncodedCallArgs() hooks PSL in (previously defined global params can be potentially overriden)
  • From a launcher script, lib.PSLLaunch(scriptFile, scriptArgs, globalParams) will launch the script scriptFile, with args scriptArgs, and will override global params with globalParams
  • globalParams is a dictionnary of global params :
    • The keys are the name of a script global params
    • If the global param is not defined in the script, no failure
    • If the the global param is defined in the script :
      • If it is a dictionnary, the dics are merged
      • If not, the value is overriden
  • The globalParams are actually sent to the script as a base64 encoded string as the named arg --updateGlobals
  • In PSLed script, the global params are updated with inspect.currentframe()

Demo implementation

  • scriptLauncher.py is the launcher script
  • scriptX.py are test launched scripts
  • params.json is defining groups of runs
  • A run is a python script + its global params overridances
  • Tests:
    • Manual / traditionnal launching : python script1.py
    • PSL lauching on all groups : python scriptLauncher.py all
    • PSL lauching on a specific group : python scriptLauncher.py smalls

Installation

  • python 3
  • pip install -r requirements.txt

+ RTreeBoilerplate

Java 100%
Last update : 24/02/2016 - 09:15

RTree tests.
Based on https://github.com/aled/jsi

Run

  • ant getDependencies
  • ant run

Screenshot

+ reactiveXBoilerplate

Java 100%
Last update : 02/02/2016 - 16:09

JavaRX boilerplate.

Run

  • ant getDependencies
  • ant run

Docs

  • http://reactivex.io/documentation/observable.html

Screenshot

+ dockerManager

PHP 99.1% - Shell 0.9%
Last update : 04/12/2015 - 19:22

dockerManager is a local and remote Docker deployment tool for git versionned projects.
Ideal for web agency testing.

Screenshot

Concepts

  • Local and remote Docker deployment for github projects
  • Project ports and shared folder configuration
  • Project environment variable for runtime environment context (and not at buildtime)
  • Project add wizard (auto port offseting)
  • Export containers files or folders of projects to the dockerManager host (see exportCommnds and exportFilesAndFolders)

Installation

  • Install Docker on target hosts (on MacOS, install docker-machine and install a machine named config/config.json > defaultDockerMachineName)
  • Install php and composer
  • Create ssh key : ssh-keygen -f ./config/id_rsa and then give to repository provider (eg. github)
  • composer install
  • Edit config/config.json if needed
  • bin/dm install

Project compliancy

  • Dockerfile must be in PROJECT_ROOT/docker folder
  • Project should be cloned at the runtime of the docker container. The revision is passed in the REVISION env variable.
  • Project environment variable is by default passed in the ENVIRONMENT env variable, which can be override in project configuration attribute environmentVariable
  • Containers are ran as daemons
  • Containers should not expose ports above config/config.json > publicAutoPortOffset

  • Project github.com:lucasmouilleron/dockeranagerTest can be used for reference

  • Projects are configured in config/projects.json

Local VS Remote deployment

  • Target deployment hosts are defined per project in config/config.json > URI
  • Project can be deloyed localy :"URI":"local"
  • Or remotely : "URI":"user@host"
  • In the case of remote hosts, make sure to ssh-copy-id the URI so remote calls won't need password typing

How to use

  • bin/dm and follow instructions
  • Run the test project : bin/dm run test, bin/dm run test REVISION_NUMBER
  • API, TODO

Thinking

  • For the Dockerfile and/or the docker container to be able to git clone the project, an ssh key must be provided. One solution is to embed the key in the repository. The key can be then associated to a user account (or to the repository deployment keys, which is a per project configuration) on the git repository provider.
  • On tester / client machines, use /etc/hosts or GasMask or HostMan so the production domain / URL points to the Docker server
  • Webapps : App environment at runtime ?
  • Websites : Avoid absolute urls, so the port is forwarded to the next page.

TODO

  • Explain export
  • Improve dm commands output
  • API :
    • REST
    • tokens
    • start and stop projects
    • list running projects
  • Sharedfolder in buildImage
  • multiple git provider (github, some gitlabs)

+ scalaWithJava

Scala 55.5% - Java 44.5%
Last update : 04/12/2015 - 12:26

Screenshot

Compile

  • mkdir classes
  • scalac -d classes *.scala *.java
  • javac -d classes -classpath $SCALA_HOME/lib/scala-library.jar:target/classes *.java

Run

  • scala -cp classes test.HelloWorld

Doc

  • http://www.codecommit.com/blog/scala/joint-compilation-of-scala-and-java-sources
  • http://stackoverflow.com/questions/28158173/building-a-project-with-mixed-scala-and-java-source-files-using-ant-illegal-cy

+ dockerManagerTest

PHP 72.5% - Shell 27.5%
Last update : 26/11/2015 - 08:21

Test project for the dockerManger project : https://github.com/lucasmouilleron/dockerManager

Screenshot

Notes

  • This a simple web server container which serves a simple index.html file.
  • The docker/id_rsa* key has been added to the github project deployment keys so it can be deployed from the Dockerfile. In production, use private repositories and assoiate ssh keys to git provider (eg github) user account.

Tests

  • From dockerManager
  • Build and run : cd docker, docker build -t test . and docker run -ti -p 8090:80 test

+ nodeWebkitBoilerplate

JavaScript 46.2% - HTML 40% - CSS 13.8%
Last update : 23/11/2015 - 16:02

A NW.js boilerplate.
Grunt building and packaging.
The sample app is not relevant (old requirejs + angular test).

Screenshot

Architecture

  • src : the app
    • index.html : entry point
    • package.json : node webkit manifest
    • assets : app assets (css + images)
    • app : logic app files
  • _build : grunt builder

Install

  • Install NodeJS : http://nodejs.org/download
  • sudo npm install bower -g
  • sudo npm install grunt -g
  • cd _build
  • npm install : installs node modules of the builder
  • grunt install : installs the app dev kit (requires password on mac os to extend open files limit)

Run

  • cd _build && grunt run
  • Debug :
    • Edit package.json
    • Change window->toolbar to true
    • Then run and click on the gear

Package

  • Config target platforms in _build/config.json ("platforms":["win", "osx"])
  • cd _build && grunt package

Demo app specific operations

  • Add a node module from npm :
    • cd src && npm install the_module --save-dev
    • Then, use with require("the_module") in the app code
  • Add a requirejs module from bower :
    • cd src && bower install the_module --save
    • Then, add path to js/libs/vendor/the_module/path/to/jsFile in app/main.js in path section and include module name in the requirejs call

Thanks

  • Thanks to the Node Webkit team @ https://github.com/rogerwang/node-webkit
  • Thanks to Joel Grenon for https://github.com/jgrenon/angular-desktop-app