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
| # Reference: http://blog.gurudelleccelsopicco.org/2009/09/online-lun-expansion-and-partition-resizing-without-reboot-under-linux/ | |
| echo 1 > /sys/block/[DEVICE]/device/rescan | |
| # DETECT IF NEW DISKS ARE ATTACHED TO THE HOST | |
| # Reference: http://www.cyberciti.biz/tips/vmware-add-a-new-hard-disk-without-rebooting-guest.html | |
| ls /sys/class/scsi_host |
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
| package timestamp | |
| import ( | |
| "fmt" | |
| "gopkg.in/mgo.v2/bson" | |
| "strconv" | |
| "time" | |
| ) | |
| type Timestamp time.Time |
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
| package main | |
| import ( | |
| "fmt" | |
| "labix.org/v2/mgo" | |
| "labix.org/v2/mgo/bson" | |
| "time" | |
| ) | |
| type Person struct { |
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
| package main | |
| import ( | |
| "fmt" | |
| "labix.org/v2/mgo" | |
| "labix.org/v2/mgo/bson" | |
| "time" | |
| ) | |
| type Person struct { |
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
| package main | |
| import "fmt" | |
| var enums []string | |
| type Enum int | |
| func (e Enum) String() string { | |
| return enums[int(e)] |
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
| instance-id: server1 | |
| local-hostname: server1.example.com | |
| network-interfaces: | | |
| iface ens160 inet static | |
| address 192.168.1.10 | |
| network 192.168.1.0 | |
| netmask 255.255.255.0 | |
| broadcast 192.168.1.255 | |
| gateway 192.168.1.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
| <VirtualHost *:443> | |
| ProxyPass / balancer://webcluster/ | |
| ProxyPassReverse / balancer://webcluster/ | |
| Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/; secure; HttpOnly" env=BALANCER_ROUTE_CHANGED | |
| # Non SSL | |
| # Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/; HttpOnly" env=BALANCER_ROUTE_CHANGED | |
| </VirtualHost> | |
| <Proxy balancer://webcluster> |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <service> | |
| <short>Zabbix-Agent</short> | |
| <description>Zabbix Agent listening port</description> | |
| <port protocol="tcp" port="10050" /> | |
| </service> |
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
| # CAM-PDF install | |
| cpan | |
| > install CAM::PDF | |
| # Replace text | |
| changepagestring.pl -o -v input.pdf srctext dsttext output.pdf | |
| # Ref: http://search.cpan.org/dist/CAM-PDF/bin/changepagestring.pl |
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
| # Remove Postfix | |
| systemctl stop postfix | |
| systemctl disable postfix | |
| yum remove postfix | |
| # Remove Avahi | |
| systemctl stop avahi-daemon.socket avahi-daemon.service | |
| systemctl disable avahi-daemon.socket avahi-daemon.service | |
| yum remove avahi-autoipd avahi-libs avahi |