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
| <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
| 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
| #!/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
| # 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
| 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
| #!/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
| #!/bin/bash | |
| LVM=vg_solus1-kvm533_img | |
| DISTRO=debian-8 | |
| DATE=$(date +%Y-%m-%d) | |
| virt-sysprep -a /dev/mapper/$LVM | |
| virt-sparsify -v /dev/mapper/$LVM --convert qcow2 --compress /home/solusvm/kvm/template/linux-$DISTRO-$DATE-x86_64-min-gen2-v1.gz |
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> | |
| Options +FollowSymLinks | |
| 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
| # Hello, when you will open website from which you will receive multi line http header, for example Upgrade: h2, h2c, | |
| # safari will return error. | |
| # fix: | |
| Header unset Upgrade |