Skip to content

Instantly share code, notes, and snippets.

@EXL
EXL / 1-ReadMe.md
Last active May 11, 2022 01:57
PushMe is fun elusive button
@nickels
nickels / supervisor.md
Last active August 29, 2022 13:25
Supervisor sudoers setup
groupadd supervisor
usermod -a -G supervisor <myusername>

/etc/supervisor/supervisor.conf

[unix_http_server]
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0770                      ; socket file mode (default 0700)
chown=root:supervisor
@lmanul
lmanul / eml2maildir.sh
Last active May 23, 2023 13:58 — forked from mailme-gx/eml2maildir.sh
Traslates .eml file to maildir format.
#!/bin/bash
# Copyright (C) 2015
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@jonathanjanssens
jonathanjanssens / functions.php
Created December 17, 2015 12:27
Add schema to yoast seo breadcrumbs
<?php
/**
* Add schema to yoast seo breadcrumb
*/
add_filter('wpseo_breadcrumb_links', 'jj_add_crumb_schema', 10, 1);
function jj_add_crumb_schema($crumbs) {
if ( ! is_array( $crumbs ) || $crumbs === array() ) {
@zdenekdrahos
zdenekdrahos / README.md
Last active September 18, 2023 13:22
Docker volumes - www-data Debian/Ubuntu + Alpine

Docker volumes - www-data Debian/Ubuntu + Alpine

Sharing host OS www-data directories as a volume is tricky for Alpine images. User ID (UID) and Group ID (GID) are different.

UID/GID Ubuntu Alpine
33 www-data xfs
82 - www-data
@JustThomas
JustThomas / nginx_remove_double_slashes.md
Created February 4, 2018 17:16
nginx: Remove double slashes from URLs

Put the following directives in your server block. nginx will then redirect URLs with double (or triple or multiple) slashes to the corresponding URL with a single slash.

merge_slashes off;
rewrite ^(.*?)//+(.*?)$ $1/$2 permanent;
@thoop
thoop / nginx.conf
Last active December 8, 2023 21:55
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
I was able to find a VERY QUICK AND DIRTY way to use the media-autobuild suite to compile my own 64-bit static FFmpeg for Windows with the NDI library.
Download it and extract to a place on your computer, and keep note of the path. I put it in "D:\ndi\media-autobuild_suite-master", so for the sake of these instructions when you see "<autobuild>", you need to substitute whatever path you've put it in.
During the initial setup process, request to use the static build and add whatever else you'd like to have in your ffmpeg, then pause what you're doing when the on-screen prompts tell you the ffmpeg_options file has been written, then go into <autobuild>\build\ffmpeg_options.txt and add somewhere a line with
Code:
--enable-libndi_newtek
@guseppiguliano
guseppiguliano / huawei_e8372_config.md
Last active February 13, 2024 11:55
Huawei E8372 Linux Configuration and Setup

Dependencies

  1. usb_modeswitch, usb_modeswitch-data
  2. libusb1
  3. libusb-devel(Fedora), libusb-dev(Debian based)

Configuration

By default, your linux box would register your Huawei E8372 as a Mass Storage device and not (somehow) as a modem. First, make sure you have the exace same device we're talking about. This can be confirmed by looking at two values using the following command (while the dongle is plugged in): As an elevated user:

    # lsusb | grep Huawei
@kenjij
kenjij / geoip.sh
Last active February 14, 2024 22:32
Downloading free MaxMind GeoIP file, use with NGINX
# Download the legacy format for NGINX compatibility
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
# Unzip
gunzip Geo*.gz
# Copy to /usr/share/GeoIP/
cp Geo*.dat /usr/share/GeoIP/