Skip to content

Instantly share code, notes, and snippets.

@auipga
auipga / git-phpstorm-emblems.sh
Last active March 13, 2017 23:25
Set nice emblems for folders containing .git, .idea or .sync folders
#!/bin/bash
# set some emblems
# currently supported:
# * phpstorm
# * git
# * rslsync (Resilio Sync / Bittorrent Sync / btsync)
# check parameters
if [ -z "$1" ]; then
echo "Missing parameter <type>.";
@auipga
auipga / titaniumbackup-btsync-cleaner.sh
Created January 11, 2017 14:37
This script helps you to (re)move old TitaniumBackup files when you backup its folder using btsync/Bittorrent Sync/rslsync/Resilio Sync. It keeps the latest 1 backup, older backups will be moved somewhere else.
#!/bin/bash
# remove old backups keeping only the latest one
# run this script only in your TitaniumBackup folder !!!
# create this folder first!
target=old
# pipe|separated|list
exclude="this.is.an.example.org.mozilla.firefox"
# | get app IDs
@auipga
auipga / iperf3.service
Last active October 7, 2024 20:06 — 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 / register-btsync-proto-gnome-firefox.sh
Last active October 8, 2024 07:33
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 / idea.properties
Created November 3, 2017 09:54
indexing
# custom PhpStorm properties
idea.config.path=~/.PhpStorm/config
idea.system.path=~/.PhpStorm/system
idea.plugins.path=~/.PhpStorm/plugins
idea.log.path=~/.PhpStorm/log
apple.laf.useScreenMenuBar = true
@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 / composer.php.ini
Last active October 25, 2018 09:02 — forked from fprochazka/composer.php.ini
Composer with different ini or with different PHP
[php]
memory_limit = -1
max_execution_time = 0
date.timezone = "Europe/Prague"
realpath_cache_size = "4096K"
extension=iconv.so
[opcache]
opcache.enable = 1
opcache.enable_cli = 1
@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.
*/
@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