Skip to content

Instantly share code, notes, and snippets.

Avatar

Matti Schneider MattiSG

View GitHub Profile
@MattiSG
MattiSG / README.md
Last active Mar 14, 2020
Traduction des recommandations d'éthique clinique italiennes pour le traitement COVID19 en saturation
View README.md

Recommandations d'éthique clinique pour l'admission et la suspension d'un traitement intensif dans des conditions exceptionnelles de déséquilibre entre les besoins et les ressources disponibles

Version 01, publiée le 06/03/2020, traduite par DeepL.

Les prévisions de l'épidémie de coronavirus (Covid-19) actuellement en cours dans certaines régions italiennes prévoient une augmentation des cas d'insuffisance respiratoire aiguë (nécessitant une hospitalisation dans l'unité de soins intensifs) dans les prochaines semaines dans de nombreux centres, d'une ampleur telle qu'elle détermine un énorme déséquilibre entre les besoins cliniques réels de la population et la disponibilité réelle des ressources intensives. Il s'agit d'un scénario dans lequel les critères d'accès aux soins intensifs (et de sortie) pourraient être nécessaires non seulement p

@MattiSG
MattiSG / BookMe.co.nz.sh
Created Jun 20, 2018
New Zealand activities watchers
View BookMe.co.nz.sh
# BookMe.co.nz watch for some deal
ACTIVITY_ID=429
while ! curl -s "https://www.bookme.co.nz/things-to-do/ajax/changeDate?date=21%21March%202018&activityId=$ACTIVITY_ID&_=1520111680085" | grep deal
do
sleep 60
date
done
@MattiSG
MattiSG / LICENSE.md
Last active Nov 24, 2017
Machine-readable map of human languages to countries they are spoken it, based on Wikipedia data
View LICENSE.md

Source data is Wikipedia, so I think this stuff is CC-BY-SA. If any rights are attributed to me for formatting, I waive them all. The parser itself is under WTFPL.

@MattiSG
MattiSG / README.md
Last active Jun 22, 2019
Great Firewall of China
View README.md

Experiments in circumventing state censorship

All tests done in October 2017 in mainland China (several provinces).

Good reference: http://blog.zorinaq.com/my-experience-with-the-great-firewall-of-china

Notes

  • The Trying to download a VPN.log file shows that some files are fingerprinted and are blocked even over an encrypted SSH connection. No idea how that is possible. Please leave a comment or send me an email if you have a clue.
@MattiSG
MattiSG / extract-formats.xsl
Created Jul 7, 2017
List XML attributes values
View extract-formats.xsl
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="*">
<xsl:for-each select="@format">
<xsl:text>format: </xsl:text>
<xsl:value-of select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
<xsl:for-each select="@type">
<xsl:text>type: </xsl:text>
@MattiSG
MattiSG / ressource-types.js
Created Apr 24, 2017
Evaluate valid OpenFisca names from a list
View ressource-types.js
var ressourceTypes = [
'aah',
'aeeh',
'af',
'aide_logement',
'allocationsChomage',
'allocationSecurisationPro',
'asf',
'asi',
'aspa',
@MattiSG
MattiSG / README.md
Last active Feb 25, 2020
Deploy bot
View README.md

Continuous deployment with Git and SSH

This article presents how to deploy continuously from a Git repository with high security, by creating a UNIX user whose only purpose and ability is to update a repository and execute commands from a script within the repository upon successful SSH connections.

Prerequisites

Your server has at least Git and some SSH agent installed, and you are connected to it as root.

Just to rephrase: all these commands are to be executed on your server, as root. ssh root@YOUR_SERVER now!

@MattiSG
MattiSG / README.md
Last active Nov 3, 2016
How to get thumbnails on webpages
View README.md

How to get thumbnails on pages

@MattiSG
MattiSG / README.md
Last active Mar 23, 2021 — forked from fyrk/README.md
Convert a wiki from MediaWiki to Gollum and Markdown, importing all metadata.
View README.md

This will convert a wiki from MediaWiki to Gollum and Markdown (or any other format supported by Pandoc).

  1. Install dependencies:

    brew install pandoc icu4c
    gem install --no-ri --no-rdoc hpricot gollum gollum-lib pandoc-ruby
  2. Perform a Special:Export

@MattiSG
MattiSG / README.md
Last active Feb 5, 2016
ChromeDriver issue reproduction
View README.md

With a running ChromeDriver:

git clone https://gist.github.com/4805526b5dcea0897c27.git
npm install selenium-webdriver
node index.js