Skip to content

Instantly share code, notes, and snippets.

@auipga
auipga / iperf3.service
Last active April 6, 2024 00:21 — forked from mmasaki/iperf.service
systemd service unit for iperf3
# /etc/systemd/system/iperf3.service
# User service: $HOME/.config/systemd/user/iperf3.service
[Unit]
Description=iperf3 server
After=syslog.target network.target auditd.service
[Service]
ExecStart=/usr/bin/iperf3 -s
@auipga
auipga / rslsync-ufw.sh
Created May 13, 2017 04:55
Help configuring ufw for Resilio Sync (rslsync)
#!/bin/bash
# Author: https://gist.github.com/auipga/
# Based on:
# Sync (outdated?): https://kb-archive.getsync.com/kbs/1.3.5/kb/hc/en-us/articles/210153106-Ports-and-protocols-used-by-Resilio-Connect.html
# Resilio Connect: https://help.getsync.com/hc/en-us/articles/204754759-What-ports-and-protocols-are-used-by-Sync-
# todo: read sync.conf from resilio server, parse json, fill IPs dynamically
# todo: delete duplicate rules as 'host' returns multiple IPs for resilios domains
@auipga
auipga / sfperm.sh
Created August 21, 2018 07:51
Setting up or Fixing File Permissions (Symfony)
#!/usr/bin/env bash
# see http://symfony.com/doc/3.4/setup/file_permissions.html
function show_help
{
# General help text
cat << EOF
Script for Setting up or Fixing File Permissions for Symfony applications
Usage: sfperm <option>
@auipga
auipga / phpstorm-survive-history.hook
Last active September 20, 2023 02:39
This script circumvents the guaranteed loss of your loved local file history in PhpStorm (with hook for Archlinux)
[Trigger]
Operation = Upgrade
Operation = Install
Type = Package
Target = phpstorm
[Action]
Depends = rsync
Description = Keeping JetBrains Cache (including local file history)...
When = PostTransaction
@auipga
auipga / install.sh
Last active September 14, 2023 19:54
simon the sorcerer with scummvm on steamdeck
#!/bin/bash
echo "do not run this file directly!";
echo "Check for updates here: https://gist.github.com/auipga/8420bd5f89f6efd7415fbd88342f3ec7";
exit;
# here are the commands you need to copy over to a terminal (Konsole in this case):
passwd # if you have no password already set up
@auipga
auipga / 0ad.json
Created December 25, 2022 00:10
input-remapper/presets/Razer Tartarus V2/0ad.json
{
"mapping": {
"1,2,1": [
"KEY_ESC",
"keyboard"
],
"1,3,1": [
"KEY_LEFTSHIFT + KEY_F5",
"keyboard"
],
@auipga
auipga / register-btsync-proto-gnome-firefox.sh
Last active November 17, 2022 22:23
register btsync protocol for firefox on gnome (does also work with rslsync)
#!/bin/bash
# see http://kb.mozillazine.org/Register_protocol#Linux
gconftool-2 -s /desktop/gnome/url-handlers/btsync/command "`which rslsync` %s" --type String
gconftool-2 -s /desktop/gnome/url-handlers/btsync/enabled --type Boolean true
# get default profile path
ff_profile=$(cat ~/.mozilla/firefox/profiles.ini | grep Path | sed s/^Path=//)
ff_profile_dir="~/.mozilla/firefox/$ff_profile"
@auipga
auipga / Netflix Marathon.user.js
Last active August 19, 2021 07:51
netflix-marathon user script ||| updates for unmaintained https://greasyfork.org/en/scripts/30029-netflix-marathon
// ==UserScript==
// @name Netflix Marathon
// @namespace https://greasyfork.org/en/scripts/30029-netflix-marathon
// @version 2.7.2
// @description Automatically skip recaps, intros and click nexts on Netflix, DisneyPlus and Amazon video for you.
// @author ran, me
// @include https://www.netflix.com/*
// @include https://www.amazon.com/gp/video/*
// @include https://www.amazon.de/gp/video/*
// @include https://www.amazon.*/gp/video/*
@auipga
auipga / ublock-static-filters-immobilienscout24.de.txt
Last active May 3, 2021 15:30
[AdBlock|uBlock] remove all visible annoyances from immobilienscout24.de
# to be pasted in uBlock -> Settings -> My Filters
www.immobilienscout24.de##.border.background.padding.removalcost-calculator-in-content
www.immobilienscout24.de##.border.grid-align-center.grid-flex.grid
www.immobilienscout24.de###propertybook_and_hub
www.immobilienscout24.de##.lap-one-whole.desk-one-third.grid-item
www.immobilienscout24.de##.one-whole.border-top.padding-top-l.margin-top-l.criteriagroup
www.immobilienscout24.de##.palm-margin-top-xl.palm-one-whole.one-half.grid-item > div > .section.sourcecode
www.immobilienscout24.de###stripe
www.immobilienscout24.de##.relocation-costs-comparison.print-hide span.with-icon:nth-of-type(4)
www.immobilienscout24.de##.premiumStatsFixedHeight
@auipga
auipga / gist:8142803018129856375c9e26eb3715b9
Last active July 30, 2019 15:04 — forked from beregond/gist:4373142
Allows to abandon necessity to define all setters and getters in Doctrine's entities (works perfectly with Symfony + Doctrine + Twig).
<?php
namespace Vendor\TestBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* General class for all entities.
*/