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
#====================================================================================== | |
# FILE: dropbox | |
# | |
# USAGE: Include in your bashrc or zshrc with "source dropbox". For system-wide | |
# use, drop this file in the /etc/bash_completion.d directory. Then tab- | |
# completion will work with the dropbox control script. | |
# | |
# DESCRIPTION: Bash/zsh completion script for dropbox | |
# | |
# AUTHOR: sluidfoe, sludfoe AT gmail DOT com |
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
touch /forcefsck | |
(http://www.cyberciti.biz/faq/linux-force-fsck-on-the-next-reboot-or-boot-sequence/) |
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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule (.*) $1.php [L] |
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
# Migrate volume to another disk in lvm | |
pvcreate /dev/new_device | |
vgextend "vg_name" /dev/new_device | |
pvmove /dev/old_device /dev/new_device | |
vgreduce "vg_name" /dev/old_device |
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
# Prompt | |
BGREEN='\[\033[1;32m\]' | |
GREEN='\[\033[0;32m\]' | |
BRED='\[\033[1;31m\]' | |
RED='\[\033[0;31m\]' | |
BBLUE='\[\033[1;34m\]' | |
BLUE='\[\033[0;34m\]' | |
NORMAL='\[\033[00m\]' | |
#if [ "$TERM" = "linux" ]; then |
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
'===================================================================== | |
' Dell Warranty Grabber | |
' Author: Matthew Boyd (iboyd.net) | |
' Date: 2/14/2012 | |
' | |
' This is an example of how to query the Dell asset information | |
' web service for warranty information and parse the XML result. | |
' values are then written to the registry of the local | |
' computer. FYI: Sometimes, the web service doesn't return any | |
' entitlements (warranties), but then returns them after |
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
$DOMAIN=example.com.br | |
$REALM=EXAMPLE | |
$AD_ADMIN_GROUP=ad_admingroup | |
# Install necessary packages | |
yum install samba-common pam_krb5 sudo authconfig samba-winbind-clients | |
# it should appear the system hostname followed by ".$DOMAIN" | |
hostname -f |
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
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout servername.key -out servername.crt |
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/bash | |
firewall-cmd --zone=internal --add-rich-rule="rule family=ipv4 source address=$SERVER_IP service name=$SERVICE_NAME accept" |
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/bash | |
# | |
# This script get all Mysql database size (except the internal one) and display it as a Json | |
# that can be used to Zabbix Discovery Rules. | |
# | |
# This simple script was created by RafaelFoster: rafaelgfoster (at) gmail (dot) com | |
# | |
# Json Output: {"data": [ { "{#DBNAME}" : "database_name","{#DBSIZE}":"size_in_bytes"},{"{#DBNAME}":"database_name2","{#DBSIZE}":"size_in_bytes"} ] } | |
cd $HOME |