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://wingloon.com/2013/05/27/how-to-setup-ssmtp-on-centos-5-9/ | |
# http://tecadmin.net/send-email-smtp-server-linux-command-line-ssmtp/ | |
yum install ssmtp | |
vim /etc/ssmtp/ssmtp.conf | |
mailhub=smtp.gmail.com:587 | |
UseSTARTTLS=YES |
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
upstream zimbramailserver { | |
server localhost:8443 weight=1 fail_timeout=300s; # Zimbra Mail client HTTPS port | |
} | |
server { | |
listen 80; | |
server_name mail.*; | |
return 301 https://$host$request_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
# Enable zimbra log to syslog (zimbra.log) | |
zmprov mcf zimbraLogToSysLog TRUE |
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
Get exchange rate as JSONP via YQL. | |
YQL Console: http://developer.yahoo.com/yql/console | |
Query (USD to SEK): select rate,name from csv where url='http://download.finance.yahoo.com/d/quotes?s=USDSEK%3DX&f=l1n' and columns='rate,name' | |
Example code: | |
<script type="text/javascript"> |
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
yum install perl gcc attr libacl-devel libblkid-devel \ | |
gnutls-devel readline-devel python-devel gdb pkgconfig \ | |
krb5-workstation zlib-devel setroubleshoot-server libaio-devel \ | |
setroubleshoot-plugins policycoreutils-python \ | |
libsemanage-python perl-ExtUtils-MakeMaker perl-Parse-Yapp \ | |
perl-Test-Base popt-devel libxml2-devel libattr-devel \ | |
keyutils-libs-devel cups-devel bind-utils libxslt \ | |
docbook-style-xsl openldap-devel autoconf python-crypto pam-devel | |
./configure \ |
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
./configure \ | |
--add-module=/usr/local/share/gems/gems/passenger-5.0.18/ext/nginx \ | |
--add-module=/etc/nginx/modules/ngx_pagespeed-release-1.11.33.2-beta \ | |
--prefix=/etc/nginx \ | |
--sbin-path=/usr/sbin/nginx \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--http-log-path=/var/log/nginx/access.log \ | |
--pid-path=/var/run/nginx.pid \ | |
--lock-path=/var/run/nginx.lock \ |
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 myip | |
curl -s www.meuip.com.br | grep -oE "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" | uniq | |
end |
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
#SSHFS on /etc/fstab | |
root@server:/dir /mount fuse.sshfs IdentityFile=/home/rafael/.ssh/id_rsa,allow_other,reconnect 0 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
# | |
# These groups are read by MariaDB server. | |
# Use it for options that only the server (but not clients) should see | |
# | |
# See the examples of server my.cnf files in /usr/share/mysql/ | |
# | |
# this is read by the standalone daemon and embedded servers | |
[server] |
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
'Rename computer by serial # v1.0 November 2009 | |
dim Bios, BiosSerial, objFSO, objTextFile | |
'Const ForReading = 1, ForWriting = 2, ForAppending = 8 | |
'get serial number | |
for each Bios in GetObject("winmgmts:").InstancesOf ("win32_bios") | |
BiosSerial = Bios.SerialNumber | |
exit for | |
next |