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 python | |
# -*- coding: utf-8 -*- | |
# | |
# gencert.py | |
# | |
# Copyright 2013 tunnelshade <blog.tunnelshade.in> | |
# | |
# * openssl genrsa -des3 -out ca.key 1024 | |
# | |
# * openssl req -new -x509 -days 3650 -key ca.key -out ca.crt |
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
' JoinDomain.vbs | |
' VBScript program to join a computer to a domain. | |
' The computer account is created in Active Directory. | |
' The computer must have XP or above. | |
' The AD must be W2k3 or above. | |
' See c:\Windows\debug\NetSetup.log for details. | |
Option Explicit | |
Dim strDomain, strUser, strPassword, strOU |
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
'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 |
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
# | |
# 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 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 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 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 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 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 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 |