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
| mklink /D "C:\Users\USERNAME\AppData\Roaming\Sublime Text 2" "C:\Users\USERNAME\Dropbox\settings\Library\Application Support\Sublime Text 2" |
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
| hosts="hostname1 hostname2" && for host in $hosts; do knife solo cook USERNAME@$host; done |
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
| var request = require('request'); | |
| var data = { | |
| "accessKey": "ACCESSKEY", | |
| "streamName": "test_sparkline", | |
| "point": [{ | |
| "number": 40, | |
| "timestamp": Math.floor((new Date)/1000) | |
| }] | |
| } |
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
| ZAB_SERVER="ZABBIX_SERVER_FQDN" && echo -e "Server=$ZAB_SERVER\nServerActive=$ZAB_SERVER\nHostnameItem=system.hostname\nInclude=/etc/zabbix/zabbix_agentd.d/\nEnableRemoteCommands=1\nLogRemoteCommands=1\nAllowRoot=1\nLogFile=/var/log/zabbix/zabbix_agentd.log\nLogFileSize=0\nTimeout=30\n" > /etc/zabbix/zabbix_agentd.conf && /etc/init.d/zabbix-agent restart && /sbin/chkconfig zabbix-agent on |
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
| system.run[mysql -uUSERNAME -pPASSWORD -e'SHOW SLAVE STATUS\G' | grep "Seconds_Behind_Master" | awk {'print $2'}] |
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
| UserParameter=mysql.repl_rate,EXEC=`mysql -e'SHOW SLAVE STATUS\G' | grep "Exec_Master_Log_Pos" | awk {'print $2'}` && READ=`mysql -e'SHOW SLAVE STATUS\G' | grep "Read_Master_Log_Pos" | awk {'print $2'}` && echo "scale=2; $EXEC / $READ" | bc |
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
| <?php | |
| $filename = "ip.txt"; | |
| $data = fopen($filename,'r'); | |
| $result = array(); | |
| while (!feof($data)){ | |
| $ip = fgets($data); | |
| if($ip){ | |
| $code = @geoip_country_code_by_name($ip); | |
| if(!isset($result[$code])){ | |
| $result[$code] = 0; |
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
| OS_VER="5" | |
| OS_TYPE="x86_64" | |
| ZAB_VER="2.0.9" | |
| ZAB_SERVER="ZABBIX_SERVER_IP_OR_FQDN" | |
| rpm -ivh http://repo.zabbix.com/zabbix/2.0/rhel/$OS_VER/$OS_TYPE/zabbix-$ZAB_VER-1.el$OS_VER.$OS_TYPE.rpm http://repo.zabbix.com/zabbix/2.0/rhel/$OS_VER/$OS_TYPE/zabbix-agent-$ZAB_VER-1.el$OS_VER.$OS_TYPE.rpm | |
| mv /etc/zabbix/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf.org | |
| echo -e "Server=$ZAB_SERVER\nServerActive=$ZAB_SERVER\nHostnameItem=system.hostname\nInclude=/etc/zabbix/zabbix_agentd.d/\nEnableRemoteCommands=1\nLogRemoteCommands=1\nAllowRoot=1\nLogFile=/var/log/zabbix/zabbix_agentd.log | |
| \nLogFileSize=0\n" > /etc/zabbix/zabbix_agentd.conf | |
| /etc/init.d/zabbix-agent start | |
| /sbin/chkconfig zabbix-agent on |
NewerOlder