This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Admin\Translator; | |
use Sonata\AdminBundle\Translator\LabelTranslatorStrategyInterface; | |
class EntityTranslatorStrategy implements LabelTranslatorStrategyInterface | |
{ | |
/** | |
* @var string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[php] | |
memory_limit = -1 | |
max_execution_time = 0 | |
date.timezone = "Europe/Prague" | |
realpath_cache_size = "4096K" | |
[opcache] | |
opcache.enable = 1 | |
opcache.enable_cli = 1 | |
opcache.memory_consumption = 256 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/iperf.service | |
[Unit] | |
Description=iperf server | |
After=syslog.target network.target auditd.service | |
[Service] | |
ExecStart=/usr/bin/iperf -s | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Runs a command wrapped with snapper pre-post snapshots for btrfs subvolumes. | |
# Usage: snp [-c config1,config2,...] <command> | |
# Constants | |
readonly LOG_PATH='/var/local/log/snp' | |
readonly DATE="$(date +'%Y-%m-%d-%H%M%S')" | |
readonly LOG_FILE="${LOG_PATH}/snp-${DATE}.log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Vendor\TestBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use Doctrine\Common\Collections\ArrayCollection; | |
/** | |
* Gneral class for all entities. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ex | |
# Paste this into ssh | |
# curl -sL https://gist.github.com/andsens/2913223/raw/bootstrap_homeshick.sh | tar -xzO | /bin/bash -ex | |
# When forking, you can get the URL from the raw (<>) button. | |
### Set some command variables depending on whether we are root or not ### | |
# This assumes you use a debian derivate, replace with yum, pacman etc. | |
aptget='sudo apt-get' | |
chsh='sudo chsh' |