Skip to content

Instantly share code, notes, and snippets.

@wilmardo
wilmardo / .php-cs.dist.php
Last active Apr 6, 2021
PHP-CS-Fixer matching the Laravel StyleCI rules. The order of rules is the same as here: https://docs.styleci.io/presets#laravel. The linecount of the rules is exactly the same (110 without risky).
View .php-cs.dist.php
<?php
# source: https://docs.styleci.io/presets#laravel
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'align_multiline_comment' => true,
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
View hugo-server.conf
server {
listen 8080 default_server;
server_name 0.0.0.;
root /var/www/html;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
@wilmardo
wilmardo / jackett.md
Created Oct 29, 2019
Jackett add public indexers all in one go
View jackett.md

Source: https://github.com/Jackett/Jackett/issues/1576#issuecomment-453656413

From the Jackett page, click the "add indexer" button so that the pop up window with the full list of indexers appears.

You'll then need to open your browser's development toolbar (in Chrome just hit F12) and go to the JavaScript Console and enter the following:

////hack to add all free indexers in Jackett
$(document).ready(function () {
	EnableAllUnconfiguredIndexersList();
View ignition.json
{
"ignition": {
"config": {},
"timeouts": {},
"version": "2.1.0"
},
"networkd": {
"units": [
{
"contents": "[Match]\nName=eth0\n\n[Network]\nDNS=9.9.9.9\nAddress=192.168.2.200/24\nGateway=192.168.2.1",
@wilmardo
wilmardo / mousewheel.md
Last active Jan 25, 2018
Setup mousewheel tab navigation xbindkeys xdotool
View mousewheel.md

Setup mousewheel navigation

Install

Open terminal and run apt-get install xbindkeys xdotool xev

Setup

Run in the terminal xev in terminal and look in which button is registered when using the mousewheel left, right click. In my case these where button six and seven.

Add in .xbindkeysrc

@wilmardo
wilmardo / php7.0-fpm
Last active Dec 26, 2016
php7.0 fpm service
View php7.0-fpm
#! /bin/sh
### BEGIN INIT INFO
# Provides: php-fpm
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php-fpm
# Description: starts the PHP FastCGI Process Manager daemon
@wilmardo
wilmardo / php5.6fpm
Last active Dec 26, 2016
php 5.6 fpm service
View php5.6fpm
#! /bin/sh
### BEGIN INIT INFO
# Provides: php-fpm
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php-fpm
# Description: starts the PHP FastCGI Process Manager daemon
View nginx
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: NGINX is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx