Skip to content

Instantly share code, notes, and snippets.

Avatar

Antoine Aflalo Belphemur

View GitHub Profile
View node-red
#!/bin/bash
### BEGIN INIT INFO
# Provides: node-red
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start or stop the node-red server
### END INIT INFO
# Can be downloaded and installed in one go by using this command
@Belphemur
Belphemur / build_nginx.sh
Last active Jul 29, 2020 — forked from MattWilcox/build_nginx.sh
Compiling Nginx with LibreSSL (and http2)
View build_nginx.sh
#!/usr/bin/env bash
# names of latest versions of each package
export NGINX_VERSION=1.15.5
export VERSION_NGINX=nginx-$NGINX_VERSION
export VERSION_LIBRESSL=libressl-2.8.1
export VERSION_PCRE=pcre-8.42
#export NPS_VERSION=1.9.32.10
#export VERSION_PAGESPEED=v${NPS_VERSION}-beta
View Node-RED.service
# This script work on any system using systemd as the init process.
# It works on Debian/Raspbian Jessie.
# If you have Debian/Rapbian Wheezy and want to use this script with systemd
# follow the information here : https://wiki.debian.org/systemd
# To easily download, install and set at startup:
# wget -O /tmp/download https://gist.github.com/Belphemur/3f6d3bf211b0e8a18d93/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/systemd/system/ && sudo systemctl --reload-daemon && sudo systemctl enable Node-RED
# To consult the log : journalctl -u Node-RED
[Unit]
@Belphemur
Belphemur / Stand Still. Stay Silent.user.js
Last active Aug 29, 2015
Userscript for Stand Still. Stay Silent
View Stand Still. Stay Silent.user.js
// ==UserScript==
// @name Stand Still. Stay silent Arrow Keys
// @namespace http://aaflalo.me
// @version 0.1
// @description Using the arrows key to navigate throught the comic
// @author Antoine Aflalo
// @match http://www.sssscomic.com/comic.php?page=*
// @include http://www.sssscomic.com/comic.php?page=*
// @updateURL https://gist.github.com/Belphemur/2920677efbfde686d0e1/raw/Stand%20Still.%20Stay%20Silent.user.js
// @downloadURL https://gist.github.com/Belphemur/2920677efbfde686d0e1/raw/Stand%20Still.%20Stay%20Silent.user.js
@Belphemur
Belphemur / transmission-ssl
Last active Feb 20, 2021
Configuration to use nginx as reverse proxy for Transmission BT with SSL/HTTP2 protected with auth
View transmission-ssl
upstream transmission {
server 127.0.0.1:9091; #Transmission
}
server {
listen 443 ssl http2;
server_name example.com;
auth_basic "Server Restricted";
auth_basic_user_file /var/www/myWebSite/web/.htpasswd;
# Path to the root of your installation
@Belphemur
Belphemur / bridge-conf
Last active Jun 5, 2021
Configuration and scripts for OpenVPN in Bridged Mode. Script to generate new client (with their keys and configuration file for OpenVPN). Script to manage the bridge. Configuration for systemd to start/stop the OpenVPN with Brige.
View bridge-conf
#!/bin/bash
# Define physical ethernet interface to be bridged
# with TAP interface(s) above.
eth="eth0"
eth_ip="192.168.42.2"
eth_netmask="255.255.255.0"
eth_broadcast="192.168.42.255"
eth_gateway="192.168.42.1"
eth_mac="XX:XX:XX:XX:XX:XX"
@Belphemur
Belphemur / iptables-tarpit.conf
Last active Apr 14, 2021
Tarpit Action for Fail2ban with rate limit
View iptables-tarpit.conf
# Fail2Ban configuration file
#
# Author: Cyril Jaquier
# Modified: Yaroslav O. Halchenko <debian@onerussian.com>
# made active on all ports from original iptables.conf
# Modified: Antoine Aflalo <antoine@aaflalo.me>
# Used the iptables-allports.conf as base for TARPIT.
#
#
@Belphemur
Belphemur / unList.nsi
Created Jul 22, 2015
Uninstaller Generator
View unList.nsi
;-----------------------------------------------------------------------------------------------
; Use MD5 plugin to generate MD5 Hash and compare them instead of timestamp.
; Rename DATE -> HASH
; 2015 Antoine Aflalo aka Belphemur (antoine@aaflalo.me)
;-----------------------------------------------------------------------------------------------
; Generate list of files and directories for uninstaller with command line support (/? for help)
; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
;-----------------------------------------------------------------------------------------------
; - added file filter as command option
; 2005 Patrick Graf (patrick.graf@gmx.net)
@Belphemur
Belphemur / transmission-dlgroup.patch
Last active Aug 29, 2015
Patch for transmission 2.84+ for Download Group
View transmission-dlgroup.patch
diff -ruN transmission-2.84+/libtransmission/platform.c transmission-2.84-patched/libtransmission/platform.c
--- transmission-2.84+/libtransmission/platform.c 2015-07-30 09:56:15.405162700 +0300
+++ transmission-2.84-patched/libtransmission/platform.c 2015-07-31 12:48:59.336636000 +0300
@@ -418,6 +418,29 @@
return user_dir;
}
+const struct tr_variant*
+tr_getDefaultDownloadGroups (void)
+{
@Belphemur
Belphemur / post-commit
Last active Sep 14, 2015
AppVeyor + AutoTagging + Git + C#
View post-commit
#! /bin/bash
basedir="$(dirname "$0")"
. $basedir/version.sh
if [ "$version" != "" ]; then
git tag -a "v$version" -m "`git log -1 --format=%s`"
echo "Created a new tag, v$version"
fi