Skip to content

Instantly share code, notes, and snippets.

@jkhsjdhjs
jkhsjdhjs / online-net_systemd-network-configuration.md
Last active Feb 22, 2021
online.net: systemd Network Configuration with (r)DNS
View online-net_systemd-network-configuration.md

online.net: systemd Network Configuration with (r)DNS

Introduction

This document will guide you through the process of setting up your online.net network addresses, DNS servers and rDNS records. For IPv4 we will use systemd-networkd (part of systemd) and odhcp6c (OpenWrt embedded DHCPv6-client) together with iproute2 for IPv6. For DNS we'll use systemd-resolved.

systemd is the default init process on Arch Linux, Debian GNU/Linux, Fedora, Ubuntu and more. iproute2 is also preinstalled there. So, if you're using a distribution that uses systemd, this tutorial should work for you. If you're using Gentoo Linux first make sure that you're using systemd.

Table of Contents

@Decstasy
Decstasy / args_parser.sh
Last active Aug 9, 2021
Parse Bash arguments without getopts or getopt
View args_parser.sh
#!/bin/bash
# Dennis Ullrich
# Version 0.1-0 (2017-06-29)
# request@decstasy.de
# Bash Version 3 required (it also works with ksh)
[[ ${BASH_VERSINFO[0]} -lt 3 ]] && exit 1
# Defaults
stdin=0
View parse_args_getopt.sh
#!/usr/bin/env bash
# Time-stamp: <2017-04-27 09:57:21 kmodi>
#
# Example of using getopt to parse command line options
# http://stackoverflow.com/a/29754866/1219634 Limitation: All the options
# starting with - have to be listed in --options/--longoptions, else getopt will
# error out. So this cannot be used in wrapper scripts for other applications
# where you plan to pass on the non-wrapper-script options to that wrapped
# application.
@PauliusIvaskevicius
PauliusIvaskevicius / DisableVehiclePeds.txt
Last active Nov 6, 2018
Disables all autospawning vehicles, peds
View DisableVehiclePeds.txt
Citizen.CreateThread(function()
while true
do
-- These natives has to be called every frame.
SetVehicleDensityMultiplierThisFrame(0.0)
SetPedDensityMultiplierThisFrame(0.0)
SetRandomVehicleDensityMultiplierThisFrame(0.0)
SetParkedVehicleDensityMultiplierThisFrame(0.0)
SetScenarioPedDensityMultiplierThisFrame(0.0, 0.0)
@magnetikonline
magnetikonline / README.md
Last active Apr 6, 2021
Nginx & PHP-FPM systemd services.
View README.md

Nginx & PHP-FPM systemd services

A basic set of systemd units for starting Nginx and PHP-FPM on system boot.

  • Ensures Nginx web server has started before the PHP-FPM process.
  • Nginx pid file placed at /run/nginx.pid.
  • PHP-FPM pid file placed at /run/php7/php-fpm.pid, PHP7 PHP-FPM config at /etc/php7.
  • Based on usage with Ubuntu 16.04LTS / 18.04LTS.

Unit files are placed in /etc/systemd/system and enabled with:

@stevenmirabito
stevenmirabito / owncloud-nginx-pretty-urls.conf
Last active Apr 2, 2018
Nginx configuration for ownCloud with support for URL rewriting (https://github.com/owncloud/core/pull/14081)
View owncloud-nginx-pretty-urls.conf
upstream php-fpm {
# Path to PHP-FPM socket
server unix:/var/run/php-fpm/php-fpm.sock;
}
server {
# Listen on port 80 for non-SSL connections
listen 80;
server_name YOURDOMAIN.XYZ;
anonymous
anonymous / config.json
Created Oct 12, 2015
Bootstrap Customizer Config
View config.json
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@benkulbertis
benkulbertis / cloudflare-update-record.sh
Last active Sep 19, 2021
Cloudflare API v4 Dynamic DNS Update in Bash
View cloudflare-update-record.sh
#!/bin/bash
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)
View finesharp.py
# finesharp.py - finesharp module for VapourSynth
# Original author: Didee (http://forum.doom9.org/showthread.php?t=166082)
# Requirement: VapourSynth r48 or later
# Rev: 2020-11-03
from vapoursynth import core, GRAY, YUV
def spline(x, coordinates):
def get_matrix(px, py, l):
@curtismcmullan
curtismcmullan / setup_selenium.sh
Last active Mar 25, 2021
Setup Selenium Server on Ubuntu 14.04
View setup_selenium.sh
#!/bin/bash
# Following the guide found at this page
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html
echo "\r\nUpdating system ...\r\n"
sudo apt-get update
# Create folder to place selenium in