Skip to content

Instantly share code, notes, and snippets.

Samuel FORESTIER HorlogeSkynet

Block or report user

Report or block HorlogeSkynet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@HorlogeSkynet
HorlogeSkynet / minecraft.service
Last active Nov 11, 2019
Systemd unit file for Minecraft server running against OpenJDK 11
View minecraft.service
[Unit]
Description=Minecraft Server
Wants=network.target
After=network.target
[Service]
User=minecraft
Group=minecraft
Nice=5
@HorlogeSkynet
HorlogeSkynet / user-overrides.js
Last active Nov 17, 2019
HorlogeSkynet's gHacks-User.JS override preferences, for Firefox & Thunderbird
View user-overrides.js
/*
>> HorlogeSkynet's gHacks-User.JS override preferences <<
Version: v0.3.2
Upstream version: v69
Installation : Follow <https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.2-Applying-Your-Changes#small_orange_diamond-the-solution>.
Notes : This is an OVERRIDE script for <https://github.com/ghacksuserjs/ghacks-user.js>, DO NOT USE IT ALONE.
*/
// Re-enables 'about:home' page for startup landing page and new tabs.
@HorlogeSkynet
HorlogeSkynet / certificate_authorities
Last active Nov 8, 2019
_Minimal_ set of required Certificate Authorities to browse (a part of) the WWW on Mozilla Firefox
View certificate_authorities
# _Minimal_ set of required Certificate Authorities to browse (a part of) WWW on Mozilla Firefox.
# This is based on the incredible work of [@aeris](https://imirhil.fr/).
# The set has been sorted by certificate nickname.
Certificate Nickname Trust Attributes
SSL,S/MIME,JAR/XPI
Amazon Root CA 1 C,,
Baltimore CyberTrust Root C,,
COMODO ECC Certification Authority C,,
@HorlogeSkynet
HorlogeSkynet / update_gitea.sh
Last active Nov 5, 2019
Gitea automatic update script from binary for Linux
View update_gitea.sh
#!/usr/bin/env bash
: "
1. Copy this script as '~/update_gitea.sh'
2. Now make it executable with 'chmod +x update_gitea.sh'
3. Set the constants below to fit your Gitea setup
"
VERSION="1.9.5"
ARCH="amd64"
@HorlogeSkynet
HorlogeSkynet / TeraStation_Shutdown.py
Last active Mar 2, 2019
A Python script to programmatically shutdown Buffalo TeraStation NAS not proposing any API
View TeraStation_Shutdown.py
#!/usr/bin/env python3
# Installation : `pip3 install requests`
import re
import requests
import ssl
import sys
import urllib3
@HorlogeSkynet
HorlogeSkynet / remove_proxmox_subscription_message.sh
Last active Nov 10, 2019
How to remove Proxmox 5 (and later) subscription message ?
View remove_proxmox_subscription_message.sh
#!/usr/bin/env bash
sed -i.bak 's/NotFound/Active/1' /usr/share/perl5/PVE/API2/Subscription.pm
systemctl restart pveproxy.service
exit 0
@HorlogeSkynet
HorlogeSkynet / test_flask_v1.py
Created Aug 24, 2018
Flask v1.X testing example with UNITTEST Python module only
View test_flask_v1.py
"""Flask v1.x testing class working with UNITTEST Python module."""
# Run this module with :
# `python3 -m unittest test_flask_v1.py`
import os
import tempfile
import unittest
# Import your production module using Flask around here.
@HorlogeSkynet
HorlogeSkynet / docker-compose.yml
Created Aug 21, 2018
How to start application container only once MongoDB has finished warming up, running with Docker
View docker-compose.yml
version: '2.3'
services:
application:
build: .
depends_on:
database:
condition: service_healthy
@HorlogeSkynet
HorlogeSkynet / generate_html.php
Created Jun 21, 2018
How to generate a HTML rendered file as of CakePHP 3 ?
View generate_html.php
<?php
use Cake\Filesystem\File;
use Cake\View\View;
/* ... */
// Instanciates a new View class.
$view = new View();
@HorlogeSkynet
HorlogeSkynet / ResetMock.py
Last active Feb 17, 2019
How to reset a mocked object during test in Python 3 ?
View ResetMock.py
#!/usr/bin/env python3
import unittest
from subprocess import check_output
from unittest.mock import patch
class YourClass(object):
def __init__(self):
You can’t perform that action at this time.