This file contains hidden or 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 | |
| socat TCP-LISTEN:1234,reuseaddr,fork UNIX-CLIENT:/tmp/foo | |
| telnet localhost 1234 | |
| # https://github.com/memcached/memcached/blob/master/doc/protocol.txt |
This file contains hidden or 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
| CREATE USER 'collectd'@'localhost' IDENTIFIED BY 'Fat4ohse'; | |
| -- Give appropriate permissions | |
| -- ("GRANT USAGE" is synonymous to "no privileges") | |
| GRANT USAGE ON *.* TO 'collectd'@'localhost'; | |
| -- Permissions for the MasterStats and SlaveStats options | |
| GRANT REPLICATION CLIENT ON *.* TO 'collectd'@'localhost'; | |
| # mysql.conf |
This file contains hidden or 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
| # http://www.varesano.net/blog/fabio/disable%20vim%20automatic%20visual%20mode%20using%20mouse | |
| If you also want do the same you can either: | |
| issue the command :set mouse-=a | |
| insert the directive set mouse-=a into your ~/.vimrc file |
This file contains hidden or 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 | |
| current_time=$(date +%s) | |
| target_time=$(date -d "$*" +%s) | |
| seconds=$(( $target_time - $current_time )) | |
| echo "sleeping $seconds (`date -d "$*"`)" | |
| sleep $seconds |
This file contains hidden or 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
| source remote { | |
| udp(ip(0.0.0.0) port(514)); | |
| }; | |
| log { | |
| source(remote); | |
| destination(d_sql); | |
| }; | |
| destination d_sql { |
This file contains hidden or 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
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteRule ^(.*)$ public/$1 [L] | |
| </IfModule> |
This file contains hidden or 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 python | |
| import os | |
| import sys | |
| import getopt | |
| if __name__ == "__main__": | |
| options, remaining = getopt.getopt(sys.argv[1:], 'r:i', ['range=', 'iface=']) | |
| #print('ARGV :', sys.argv[1:]) |
This file contains hidden or 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
| # cat /etc/network/interfaces | |
| auto vmbr0 | |
| iface vmbr0 inet manual | |
| bridge-ports eno1 | |
| bridge-stp off | |
| bridge-fd 0 | |
| bridge_vlan_aware yes | |
| bridge_vids 610 # not supported multiple vlans, only range 2-4094 | |
| post-up bridge vlan add dev eno1 vid 610; bridge vlan add dev eno1 vid 802 |
This file contains hidden or 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/sh | |
| # | |
| # Read-only Root-FS for Raspian | |
| # | |
| # Modified 2016 by Stefan Bonfert to make it compatible with Raspbian | |
| # Jessie (vanilla). | |
| # | |
| # Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with | |
| # overlayfs integrated in Linux Kernel >= 3.18. | |
| # |
This file contains hidden or 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 -e | |
| DOMAIN=solusvm | |
| /root/certbot-auto renew | |
| cat /etc/letsencrypt/live/$DOMAIN/{privkey,cert}.pem > /usr/local/solusvm/ssl/cert.pem | |
| /etc/init.d/solusvm restart |