This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [{"id":"4fede17c312f912796000034","cover_url":null,"description":null,"rating":6.3,"title":"L'affaire Gordji, histoire d'une cohabitation"},{"id":"4fede17f312f912796000035","cover_url":null,"description":"Documentary telling the true story of the sinking of the liner Laconia by a German U-boat in 1942 through the eyes of six survivors.","rating":6.8,"title":"Le naufrage du Laconia - partie 1"},{"id":"4fede181312f912796000036","cover_url":null,"description":"Documentary telling the true story of the sinking of the liner Laconia by a German U-boat in 1942 through the eyes of six survivors.","rating":6.8,"title":"Le naufrage du Laconia - partie 2"},{"id":"4fede184312f912796000037","cover_url":"http://ia.media-imdb.com/images/M/MV5BMjAyMTg0MjgwOV5BMl5BanBnXkFtZTcwNTEzODY4Mw@@._V1._SX94_SY140_.jpg","description":"The extraordinary story of three Rwandan kids who walk 3000 miles to the Soccer World Cup in South Africa...","rating":6.2,"title":"Africa United"},{"id":"4fede186312f912796000038","cover_url":"http://ia. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ruby:3.0.1 | |
| ARG USER_ID | |
| ARG GROUP_ID | |
| RUN addgroup --gid $GROUP_ID user | |
| RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID user | |
| RUN apt-get update -qq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ruby:3.0.1 | |
| ARG USER_ID | |
| ARG GROUP_ID | |
| RUN addgroup --gid $GROUP_ID user | |
| RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID user | |
| RUN apt-get update -qq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? echo "Hello World" ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2' | |
| services: | |
| web: | |
| build: . | |
| links: | |
| - redis | |
| - webpack | |
| ports: | |
| - 2400:2400 | |
| volumes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Add this to fetch the SCALINGO_MYSQL_URL | |
| $url = parse_url(getenv("SCALINGO_MYSQL_URL")); | |
| $db['default'] = array( | |
| 'dsn' => '', | |
| 'hostname' => $url["host"], | |
| 'username' => $url["user"], | |
| 'password' => $url["pass"], | |
| 'database' => substr($url["path"], 1), | |
| 'dbdriver' => 'mysqli', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DATABASE_URL=mysql2://dbuser:secret@127.0.0.1/dbuser | |
| DATABASE_URL_TEST=mysql2://dbuser:secret@127.0.0.1/dbuser | |
| DEFAULT_HOST=localhost:3000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "sinatra" | |
| get '/' do | |
| html = "" | |
| filenames = Dir.glob("articles/*.txt").sort.reverse | |
| filenames.each{|filename| | |
| html += article_as_html(filename, 100) | |
| } | |
| return layout(html) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "sinatra" | |
| get '/' do | |
| html = "" | |
| filenames = Dir.glob("articles/*.txt").sort.reverse | |
| filenames.each{|filename| | |
| html += article_as_html(filename, 100) | |
| } | |
| return layout(html) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "sinatra" | |
| get '/' do | |
| html = '<html><head><title>Mon blog</title><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous"></head><body>' | |
| html += '<div class="container"><div class="row"><div class="col-12">' | |
| # récupération de la liste des noms de fichiers, triée par ordre alphabétique inverse | |
| filenames = Dir.glob("articles/*.txt").sort.reverse | |
| filenames.each{|filename| | |
| # on lit le contenu du fichier |
NewerOlder