Code By
Lucas Mouilleron

62 projects - An Open Source selection

TSDataCenter

Java 99.8% - PHP 0.2% - Shell 0%
Last update : 16/06/2018 - 09:43
TSDataCenter software.
Project is private, can't show more.

TSDeGama

Python 96.6% - CSS 2.3% - Shell 1.1%
Last update : 16/06/2018 - 09:42
Interactive analysis framework.
Project is private, can't show more.

TSAnalysisWorld

Python 99.6% - CSS 0.3% - Shell 0.1%
Last update : 14/06/2018 - 11:53
Analysis framework.
Project is private, can't show more.

siteERAAM

PHP 56.7% - HTML 19.2% - JavaScript 13.1% - CSS 9% - Shell 2%
Last update : 13/06/2018 - 16:13
Project is private, can't show more.

TSMagellan

Python 98.2% - Shell 1.3% - CSS 0.5%
Last update : 09/06/2018 - 14:21
TSMagellan environment. Main software, scripts and docs.
Project is private, can't show more.

TSSysAdmin

Python 91.6% - Shell 4.8% - Scheme 3.5% - Vim script 0.1%
Last update : 07/06/2018 - 10:51
System administration tools.
Project is private, can't show more.

+ heartBeat

Python 67.3% - Java 23.5% - JavaScript 7.1% - Shell 1.9% - HTML 0.1%
Last update : 03/06/2018 - 10:42

Screenshot

An implementation of heartbeat monitoring.

Definitions

  • The server is in charge of monitoring services
  • When a service is considered dead, the server then alerts its owner
  • A service is a pulsing agent
  • A pulse is a sign of aliveness
  • When a service pulse the server, it tells him when he will pulse again in the worst case
  • If the service has not pulsed again in time, the server considers the service dead and alerts its owner
  • When a service is no longer required, it must inform the server to avoid a false dead alerts
  • An Alert can be a mail, a pushover message, etc.

Implementation

  • HTTP client / server architecture
  • All queries protected by password set in HTTP headers under "password"
  • Protocol :
    • Pulse :
      • POST /
      • {"service":"SERVICE_NAME","alertType":"ALERT_TYPE","alertTarget":"TARGET_NAME","nextIn":EXPECTED_NEXT_HEARTBEAT_IN_SECS}
    • Cancel :
      • DELETE /
      • {"service":"SERVICE_NAME"}
    • List :
      • GET /

Server

  • ./server
  • python3
  • Dependencies : pip install -r requirements.txt
  • Config :
    • config/config.json : main config (cp config/sample.json config/config.json)
    • config/server.crt, config/server.key : SSL certificate, used only if SSL activated
  • Datas : data
  • Deploy :
    • Install dependencies
    • Setup config
    • Generate ssl certificates (optional)
    • Hook in with upstart (optional, ./server/config/sample.upstart.conf, http://upstart.ubuntu.com/getting-started.html)
  • Run : python server.py
  • Docker :
    • ./docker
    • Config : place server config files in ./docker/config
    • Interactive : cd docker && tools/dockerBuild && tools/dockerRun
    • Detached : cd docker && tools/dockerBuild && tools/dockerRunDetached

Java Client

  • ./clientJava
  • Java 7+
  • No dependencies
  • Run test :

Python Client

  • ./clientPython
  • python3
  • Dependencies : requests (pip install requests)
  • Run test : python test.py

Javascript client

  • ./clientJavascript
  • client.js is a node module
  • Dependencies : packages.json -> devDependencies (npm install)
  • Run test : node test.js
  • Run test in browser : browserify test.js -o bundle.js and open test.html in browser

Certificates

  • Self signed : openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt
  • Letsencrypt : TODO

TODO

  • Put data writing in a queue
  • Put alert sending in a queue

macInstaller

Shell 68.1% - PHP 21.9% - Python 6.2% - Ruby 3.8%
Last update : 25/05/2018 - 18:39
Installer for a new Mac.
Project is private, can't show more.

TSDashboard

HTML 70.6% - CSS 9.6% - JavaScript 9.5% - Python 6.9% - Shell 2.5% - PHP 0.8%
Last update : 20/05/2018 - 14:30
Content agnostic dashboard app.
Project is private, can't show more.

+ stupidCMS

PHP 69.5% - JavaScript 19.5% - CSS 6.3% - HTML 4.7%
Last update : 05/05/2018 - 11:12

stupidCMS is a flat file stupid CMS with nice templating and caching engines.

Screenshot

Install

  • Drop all files (including .htaccess) at the site root
  • Create the file ./config.php and override default config (cf Overridable Configuration)

Stupid Pages (SP)

  • Stupid Pages files extensions is .html
  • In Stupid Pages, paths are relative to the site root
  • To link from a page to another page, use http://site.com/other-page
  • They use the Stupid Micro Templating Engine (SMTE) allowing administrable content declaration

Stupid Micro Templating Engine (SMTE)

  • Administrable contents : {{CNT:content-name}}
  • Administrable files : <img src="{{FILE:file-name.jpg}}"/> or <a href="{{FILE:file-name.pdf}}">the file</a>
  • Include another page in a page : {{INC:page-name-without-html-extension}}
  • Definitions : {{DEF:CONSTANT_NAME}} (for example SITE_URL)
  • If : {{IF:php expression}}content{{EIF}}

Studid Dynamic Page (SDP)

  • Stupid Pages files extensions can be .php
  • In this case the page is a Stupid Dynamic Page (SDP)
  • Custom php scripting can be addded
  • <?php global $stupid;?> must be called to make the stupid engine available
  • Sutpid API available :
    • $stupid->__inc("page-name-without-html-extension")
    • $stupid->__cnt("content-name")
    • $stupid->__file("file-name")
  • No CSPC cache is applied (it is applied only for included contents)

Compiled Stupid Pages Caching (CSPC)

  • Compiled Stupid Pages are cached for performance optimization
  • The cache engine is selectable in /config.php
  • Three engines are available :
    • None cache engine : no cache, all pages and contents are loaded from original files (not recommended)
    • File cache engine : cache files are located in /__cache
    • Redis cache engine : redis port is configurable in ___stupid/libs/stupidDefinitions.php
  • In DEVELOPMENT_MODE, the cache is disabled

Stupid Backend (SB)

  • stupidCMS comes with a stupid backend
  • Open http://site.com/admin in browser
  • Content editing :
    • Add contents in pages using the SMTE format
    • Run a Scan to populate the backend interface
    • Edit and save contents
    • Tips :
      • Contents are SMTE compatible, which means you can use the SMTE tags
      • Contents can be written in Markdown format :
  • Files editing :
    • Add files in pages using the SMTE format
    • Run a Scan to populate the backend interface
    • Edit and save files
  • Pages editing :
    • All SP and SDP can be edited from the backend
    • Templates can be used for scaffholding (templates are defined in /__templates)
    • /config.php is editable as well
  • Scan :
    • If SMTE administrable content are not visible, run Scan
    • Scan contents scans for contents and files
  • Clear :
    • If new contents or files don't appear, run Clear, to clear the cache
    • In DEVELOPMENT_MODE, cache is disabled, therefore Clear is not needed
  • Clean : TODO

Administration - Overview

  • Pages are created from backend or manually in root folder (html or php)
  • Reference administrable contents of files with {{CNT:the-content-name}} or {{FILE:the-file-name.pdf}}
  • Scan contents in pages, then edit the contents in the backend
  • Contents : edit contents
  • Files : edit files
  • Scan : scan for new contents or files referenced in pages
  • Pages : add or edit pages

Administration - Contents

  • Scan : scan for new files referenced in pages
  • Go to Contents
  • Edit the relevant content
  • Edit one content at the time (the Save button (or ctrl+shift+enter) save only the current content)
  • To use Markdown syntax, the first line of content must be ***

Administration - Files

  • Scan : scan for new files referenced in pages
  • Go to Files
  • Upload the relevant file with the Replace button

Overridable configuration

  • Defined in ___stupid/libs/stupidDefinitions.php
  • DEBUG_MODE (true): displays hints
  • DEVELOPMENT_MODE (false): no cache for easier development
  • ADMIN_PASSWORD ("password"): has to be changed
  • SITE_URL ("http://localhost"): has to be set to the site root url
  • PAGE_404 (false): false or the name of the 404 page (without extension)
  • NO_SCAN_FOLDERS (none): folders not to scan when finding contents and files
  • SMTE_CACHE_ENGINE ("file"): file | redis | none

Dev

  • Install composer : curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
  • Install dependencies : cd ___stupid && composer install
  • Underlying cotents in ./__contents
  • Underlying files in ./__files

TODO

  • sub folder index
  • guidlines

Naming

Menus