Skip to content

Instantly share code, notes, and snippets.

View phuysmans's full-sized avatar

Philippe Huysmans phuysmans

View GitHub Profile
@wikrie
wikrie / fritzbox-cert-update.sh
Last active March 2, 2024 10:48
Fritzbox Fritz!Box AVM SSL Letsencrypt automatically update
#!/bin/bash
## this little Gist is for Copy the Letsencrypt Cert from an Linux machine (e.g. Raspberry PI or Synology NAS)
## to the router (Fritzbox).
## It is usefull to be able to speak to the Router over DDNS without any Cert issue in the Browser.
## thanks to https://gist.github.com/mahowi for the perfect Idea
## put it in /etc/letsencrypt/renewal-hooks/post so it gets run after every renewal.
## since Fritz OS 7.25 it is needed to select a Username, from a security point of view
## it is always a good idea to have a non default user name. And as normaly a Fritz Box
## is connected to the Internet, the prefered method should be WITH Username.
@pigeonflight
pigeonflight / README.rst
Created April 16, 2017 04:22
Script to mount hetzner backup space

Setup

All commands here are run as root Install sshfs and autofs :

apt-get update
apt-get install sshfs autofs

Ensure you have an ssh key:

@beatngu13
beatngu13 / Jenkinsfile
Last active July 13, 2022 21:58
Fancy notifications for Slack and HipChat in a scripted Jenkins pipeline
// Based on https://jenkins.io/blog/2016/07/18/pipeline-notifications/.
def notifyMessengers(String buildStatus = 'STARTED') {
// Build status of null means successful.
buildStatus = buildStatus ?: 'SUCCESS'
// Replace encoded slashes.
def decodedJobName = env.JOB_NAME.replaceAll("%2F", "/")
def colorSlack
def colorHipchat
@ysegorov
ysegorov / Jenkinsfile
Last active April 8, 2021 14:31
Jenkinsfile example
#!/usr/bin/env groovy
// https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/build-test.groovy
// http://stackoverflow.com/a/40294220
// https://JENKINS_HOST/scriptApproval/ - for script approval
import java.util.Date
def isMaster = env.BRANCH_NAME == 'master'
def isDevelop = env.BRANCH_NAME == 'develop'
@alexeygrigorev
alexeygrigorev / vimeo-download.py
Created September 17, 2016 09:09
Downloading segmented video from vimeo
import requests
import base64
from tqdm import tqdm
master_json_url = 'https://178skyfiregce-a.akamaihd.net/exp=1474107106~acl=%2F142089577%2F%2A~hmac=0d9becc441fc5385462d53bf59cf019c0184690862f49b414e9a2f1c5bafbe0d/142089577/video/426274424,426274425,426274423,426274422/master.json?base64_init=1'
base_url = master_json_url[:master_json_url.rfind('/', 0, -26) + 1]
resp = requests.get(master_json_url)
content = resp.json()
@psychemedia
psychemedia / Dockerfile
Last active June 2, 2023 03:26
Example of setting up a docker image that will expose Audacity UI via a browser using guacamole remote desktop application.
#via https://github.com/linuxserver/dockergui
# Builds a docker gui image
#FROM hurricane/dockergui:xvnc
FROM hurricane/dockergui:x11rdp1.3
#Use an updated build
#FROM psychemedia/dockergui
#########################################
## ENVIRONMENTAL CONFIG ##
#########################################
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@scorpp
scorpp / proxmox-backup-hook.sh
Last active December 29, 2020 13:40
Hetzner backup hook to mount Hetzner backup space
#!/bin/bash
# vzdump hook script that handles mounting of [Hetzner] backup space
# [over SFTP] and then mounting an FS image stored there.
# After backup is done backup image is remounted to ensure data synced.
# Relies on /etc/fstab entries for backup mount points and pub key auth
# for SFTP.
#
# Corresponding fstab enties:
# uXXXXXX@uXXXXXX.your-backup.de: /mnt/backup-space fuse.sshfs defaults,noauto,allow_root,_netdev 0 0
# /mnt/backup-space/image /mnt/backup ext4 noauto,defaults,loop 0 0
@sparrc
sparrc / phabricator_readme.md
Last active March 25, 2024 05:59
Phabricator Ubuntu Installation Guide

Phabricator Ubuntu Installation Guide

This is a supplement to the official Phabricator Installation Guide, because their guide will leave you with all kinds of permission and config errors and ~15,000 setup issues on startup.

Install bonus packages:

# apt-get install mercurial subversion python-pygments sendmail imagemagick

Create necessary users and add phd-user to sudoers:

@webcss
webcss / mithril-touch.js
Last active May 26, 2020 15:34
mithril-touch, consume touch and mouse events evenly with mithril
/*****************************************
/* DOM touch support module
/*****************************************/
if (!window.CustomEvent) {
window.CustomEvent = function (event, params) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
};