This file contains 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 bash | |
MESSAGE=${*} | |
LANGUAGE=pt | |
TTSURL="http://translate.google.com/translate_tts" | |
USERAGENT="Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20111114 Ubuntu/9.10 (karmic) Firefox/8.0.1" | |
curl -s -G \ | |
--user-agent "${USERAGENT}" \ | |
--data-urlencode "tl=${LANGUAGE}" \ | |
--data-urlencode "q=${PREFIXMESSAGE} ${MESSAGE}" \ | |
--header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" \ |
This file contains 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
location / { | |
add_header X-Cached $upstream_cache_status; | |
.... | |
proxy_cache_bypass $http_cache_purge; | |
.... | |
proxy_pass ... ; | |
} |
This file contains 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 $upstream_http_content_length $flag_cache_empty { | |
default 0; | |
0 1; | |
} | |
server { | |
.... | |
location / { | |
... | |
proxy_no_cache $flag_cache_empty; |
This file contains 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
Cached: <!--# echo var="date_local" --> |
This file contains 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
virtual_server 192.168.0.10 1433 { | |
delay_loop 5 | |
lb_algo lc | |
lb_kind DR | |
protocol TCP | |
real_server 192.168.1.10 1433 { | |
weight 1 | |
MISC_CHECK { | |
misc_path /path/to/check_mssql_mirror.py |
This file contains 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 bash | |
WEBSERVERS="apache1.domain.com apache2.domain.com apache3.domain.com apache4.domain.com" | |
for server in ${WEBSERVERS};do | |
wget -q -O - ${server}/server-status | grep 'HTTP' | \ | |
while IFS=$'\n' read; do | |
if [[ ${REPLY} =~ (GET|POST|HEAD)\ (.+?)\ HTTP ]]; then | |
echo ${BASH_REMATCH[2]} | |
fi | grep -v server-status | |
done | |
done | sort | uniq -c | sort -rk1 | head -20 |
This file contains 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
@ECHO OFF | |
SETLOCAL ENABLEDELAYEDEXPANSION | |
FOR %%A IN (%*) DO ( | |
PSEXEC.EXE \\%%A %windir%\system32\inetsrv\appcmd list requests > %TMP%\output-%%A.log 2>&1 | |
) | |
FOR %%A IN (%*) DO ( | |
TYPE %TMP%\output-%%A.log | FIND "REQUEST" >> %TMP%\output.log | |
DEL %TMP%\output-%%A.log | |
) | |
FOR /F "tokens=2,3 delims==:" %%A IN (%TMP%\output.log) DO ECHO %%A | SORT >> %TMP%\outputs.log |
This file contains 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
Get-NetAdapter -Physical | where {$_.status -eq "UP"} |
This file contains 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
New-NetLbFoTeam -Name 'TEAM' -TeamMembers 'Ethernet 8','Ethernet 4' -TeamingMode SwitchIndependent |
OlderNewer