Skip to content

Instantly share code, notes, and snippets.

View damoun's full-sized avatar

Damien Plénard damoun

View GitHub Profile
@damoun
damoun / MuninPluginAbstract.php
Created July 26, 2012 11:25
A simple abstract class to create a munin plugin
<?php
class Field
{
protected $_name;
protected $_label;
protected $_color;
protected $_value;
public function Field($label, $color = false)
@damoun
damoun / bjtu-net-bruteforcer.user.js
Created October 28, 2012 07:31
Greasemonkey script to login on Wifi/Ethernet Web Login at BJTU
// ==UserScript==
// @name BJTU Net BruteForcer
// @namespace https://gist.github.com/gists/3967968
// @version 0.45
// @description Greasemonkey script to login on Wifi/Ethernet Web Login at BJTU
// @author Damien Plenard
// @include https://10.1.154.*/portal/*
// @include http://10.10.43.3/*
// @grant GM_getValue
// @grant GM_setValue
@damoun
damoun / complete.sh
Last active July 21, 2022 23:57
Send notification when transmission finished to download a file.
#!/bin/bash
/var/lib/transmission-daemon/notify.py $TR_TORRENT_NAME
@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
{% from "opensmtpd/map.jinja" import opensmtpd with context %}
opensmtpd:
pkg:
- installed
- pkgs: {{ opensmtpd.pkgs|json }}
service:
- running
- name: {{ opensmtpd.service }}
- require:

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:

@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:
@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 / 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 / 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'