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
| # Redirect everything that goes to syslog to Graylog | |
| --- | |
| - hosts: localhost | |
| tasks: | |
| - name: Configuring Graylog client | |
| lineinfile: line="*.* @172.16.5.147:5140;RSYSLOG_SyslogProtocol23Format" | |
| dest="/etc/rsyslog.d/graylog.conf" | |
| create=yes | |
| notify: | |
| - restart rsyslog |
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
| map $http_accept_language $index_redirect_uri { | |
| default "/en/"; | |
| "~(^|,)en.+,ru" "/en/"; | |
| "~(^|,)ru.+,en" "/ru/"; | |
| "~(^|,)en" "/en/"; | |
| "~(^|,)ru" "/ru/"; | |
| } | |
| location = / { | |
| return 302 $index_redirect_uri; |
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
| cmdkey.exe /add:10.15.1.15 /user:MACHINE\jenkins /pass:changeme | |
| robocopy Project\bin\Release \\MACHINE\tempshare /s /xo /fft /R:10 /xf *.config | |
| psservice \\10.15.1.15 -accepteula stop Service | |
| psexec \\10.15.1.15 -accepteula robocopy c:\tempshare c:\Service /s /xo /fft /R:10 /xf *.config | |
| psservice \\10.15.1.15 -accepteula start Service | |
| cmdkey.exe /delete:10.15.1.15 |
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
| To add BLF enter in Line Key -> Extended Function | |
| fnc=blf+sd+cp;sub=123@$PROXY;ext=123@$PROXY | |
| where 123 is number to watch. | |
| No additional settings in recent FreePBX versions needed. |
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 | |
| if (!($_REQUEST['token'] == '')) die('I`m afraid, Dave, I can`t do that.'); | |
| $jenkins_url = 'http://jenkins.local'; | |
| $job_name = str_replace($_REQUEST['trigger_word'].' ', '', $_REQUEST['text']); | |
| $job_name = str_replace('/', '', $job_name); // Anti-injection | |
| //$job_name = preg_replace('/[^A-Za-z0-9\-]/', '', $job_name); // Remove special chars | |
| $url=$jenkins_url.'/job/'.$job_name.'/build'; |
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
| [ $# -eq 0 ] && { echo "Usage: $0 username"; exit 1; } | |
| if [ -d "/opt/clientconfig/$1/" ]; then | |
| echo "Already exists" | |
| exit 1 | |
| fi | |
| cd /opt/client-ca | |
| source vars | |
| KEY_EXPIRE=183 | |
| ./build-key $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
| #!/bin/sh | |
| # | |
| MyBackup="mysql.backup.`date +%Y.%m.%d.at.%H.%M.%S`.tbz" | |
| MyBackup2="etcdir.backup.`date +%Y.%m.%d.at.%H.%M.%S`.tbz" | |
| MyBackup3="wwwdir.backup.`date +%Y.%m.%d.at.%H.%M.%S`.tbz" | |
| MyBackup4="varlib.backup.`date +%Y.%m.%d.at.%H.%M.%S`.tbz" | |
| rm -f /astdb/backups/backup.sql | |
| /usr/bin/mysqldump -udump -pdump --skip-add-drop-table --single-transaction --all-databases > /astdb/backups/backup.sql | |
| cd /astdb/backups/ | |
| tar cjf $MyBackup backup.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
| # MariaDB 10.1 config file for Zabbix 3.0 | |
| # | |
| # MariaDB programs look for option files in a set of | |
| # locations which depend on the deployment platform. | |
| # You can copy this option file to one of those | |
| # locations. For information about these locations, do: | |
| # 'my_print_defaults --help' and see what is printed under | |
| # Default options are read from the following files in the given order: | |
| # More information at: http://dev.mysql.com/doc/mysql/en/option-files.html | |
| # |
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
| function Get-WindowsKey { | |
| ## function to retrieve the Windows Product Key from any PC | |
| ## by Jakob Bindslet ([email protected]) | |
| param ($targets = ".") | |
| $hklm = 2147483650 | |
| $regPath = "Software\Microsoft\Windows NT\CurrentVersion" | |
| $regValue = "DigitalProductId4" | |
| Foreach ($target in $targets) { | |
| $productKey = $null | |
| $win32os = $null |
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
| mkdir "c:\program files\zabbix\" | |
| copy zabbix_agentd.conf "c:\program files\zabbix\" | |
| copy zabbix_agentd.exe "c:\program files\zabbix\" | |
| "c:\program files\zabbix\zabbix_agentd.exe" --config "c:\program files\zabbix\zabbix_agentd.conf" --install | |
| "c:\program files\zabbix\zabbix_agentd.exe" --config "c:\program files\zabbix\zabbix_agentd.conf" --start | |
| netsh advfirewall firewall add rule name="Zabbix agent" dir=in action=allow program="c:\program files\zabbix\zabbix_agentd.exe" profile=domain enable=yes | |
| netsh advfirewall firewall add rule name="Zabbix agent" dir=in action=allow program="c:\program files\zabbix\zabbix_agentd.exe" profile=private enable=yes |