Skip to content

Instantly share code, notes, and snippets.

View damoun's full-sized avatar

Damien Plénard damoun

View GitHub Profile
@damoun
damoun / assign-hcloud-floating-ip.sh
Created September 1, 2023 12:22
Assign Hetzner Cloud floating IP to a server
#!/bin/bash
# Let you assign a floating IP to this server.
# Useful for Keepalived
#
# Require curl & jq
API_TOKEN=""
FLOATING_IP_ID=""
SERVER_ID=""
@damoun
damoun / README.md
Last active November 5, 2020 14:18
Ziggo emoji SSID

Ziggo ConnectBox

The Web UI of the Ziggo ConnectBox router doesn't accept unicode character as a SSID but it check it with javascript/client side. So here is a python script to change the SSID and use unicode/emoji in your wireless SSID.

result

Requirements

pip install requests

@damoun
damoun / twitch.py
Created August 30, 2017 13:22
Error on gzipped content
from flask import Flask, redirect, url_for, session
from flask import request, jsonify
from flask_oauthlib.client import OAuth
APP = Flask(__name__)
APP.debug = True
APP.secret_key = 'development'
@damoun
damoun / httpd.conf
Created October 15, 2016 21:22
OpenBSD httpd configuration for Rainloop
types { include "/usr/share/misc/mime.types" }
server "webmail.exemple.com" {
listen on egress port 80
listen on egress tls port 443
tls certificate "/etc/ssl/webmail.exemple.com.crt"
tls key "/etc/ssl/private/webmail.exemple.com.key"
location "/data*" { block }
@damoun
damoun / esp8266_temp.ino
Created February 22, 2016 17:16
Source code of my ES8266 temperature/humidity sensor
#include <ESP8266WiFi.h>
#include <Wire.h>
#include <PubSubClient.h>
#include <Adafruit_HDC1000.h>
#define wifi_ssid ""
#define wifi_password ""
#define mqtt_server ""
#define mqtt_user ""
@damoun
damoun / hass
Last active June 26, 2018 19:07
home-assistant rc script for Freebsd
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: hass
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:

Keybase proof

I hereby claim:

  • I am Damoun on github.
  • I am dam0un (https://keybase.io/dam0un) on keybase.
  • I have a public key whose fingerprint is 9C3B 65A0 9B47 FF61 BD47 2D67 223D 2DB4 6243 F467

To claim this, I am signing this object:

{% from "opensmtpd/map.jinja" import opensmtpd with context %}
opensmtpd:
pkg:
- installed
- pkgs: {{ opensmtpd.pkgs|json }}
service:
- running
- name: {{ opensmtpd.service }}
- require:
@damoun
damoun / smtpd.conf
Last active December 14, 2015 18:18
My smtpd.conf file for a secondary mx mail server with OpenSMTPD (and ubuntu 12.04).
# Ubuntu 12.04
# http://bogoflop.com/debian_install_opensmtpd.html
#
# /usr/local/etc/smtpd.conf
listen on all hostname mx2.exemple.com
table exemple { exemple.com, name.me }
accept for local deliver to mbox