dig +short A <hostname>
du -a / | sort -n -r | head -n 10
sed -i 's/old-word/new-word/g' *.txt
#!/bin/sh | |
################################################################################ | |
# Bash script to add a new domain (Apache2) | |
# (c) 2014 Mike Everhart | PlasticBrain Media LLC | |
# | |
# Prerequisites: | |
# Create a vhosts "template" in $APACHEDIR/sites-available. The template should | |
# include placeholders ($TOKEN) that will be replaced with the new domain name. | |
# See https://gist.github.com/plasticbrain/9620846 for an example template | |
# |
$ sudo apt-get install autoconf gcc build-essential apache2-prefork-dev apache2-threaded-dev libtool | |
$ wget http://www.ip2location.com/downloads/ip2location-apache-5.0.0.tar.gz | |
$ tar xvfz ip2location-apache-5.0.0.tar.gz | |
$ wget http://www.ip2location.com/downloads/ip2location-c-6.0.2.tar.gz | |
$ tar xvfz ip2location-c-6.0.2.tar.gz | |
$ cd ip2location-c-6.0.2/ | |
$ autoreconf -i -v --force |
$ sudo apt-get install libapache2-mod-geoip | |
$nano /etc/apache2/mods-available/geoip.conf | |
Uncomment "GeoIPDBFile" line | |
For WorldTrack, the file location is: /var/www/geoip.dat | |
You should store your .dat file OUTSIDE of your publicly accessible www dir | |
OR, use .htaccess to deny access to it: |
<?php | |
//--------------------------------------------------------------------------------- | |
// You can get the metadata for an AWS instance by loading the following URL | |
// Note: This URL must be loaded from an AWS instance | |
// | |
//--------------------------------------------------------------------------------- | |
// URL: | |
// http://169.254.169.254/latest/meta-data/instance-id | |
// | |
//--------------------------------------------------------------------------------- |
{ | |
"pools" : [ | |
{ | |
"url" : "", | |
"user" : "", | |
"pass" : "" | |
}, | |
{ | |
"url" : "", | |
"user" : "", |
{ | |
"pools" : [ | |
{ | |
"url" : "", | |
"user" : "", | |
"pass" : "" | |
}, | |
{ | |
"url" : "", | |
"user" : "", |
[Configuration] | |
FontName=Droid Sans Mono 10 | |
ColorCursor=#0f0f49499999 | |
ColorForeground=#838394949696 | |
ColorBackground=#00002b2b3636 | |
ColorPalette1=#070736364242 | |
ColorPalette2=#dcdc32322f2f | |
ColorPalette3=#858599990000 | |
ColorPalette4=#b5b589890000 | |
ColorPalette5=#26268b8bd2d2 |
I. Prerequisites | |
$ apt-get install apache2-prefork-dev | |
$ apt-get install apache2-threaded-dev | |
$ apt-get install libgeoip-dev | |
1. Download and install mod_geoip2 | |
http://www.maxmind.com/download/geoip/api/mod_geoip2/mod_geoip2-latest.tar.gz |
Edit your .bashrc file: | |
$ nano ~/.bashrc | |
Add the following line, changing "New Title" to whatever you want | |
PROMPT_COMMAND='echo -ne "\033]0;New Title\007"' | |
NOTE: In some cases, when you switch to root or a different user, the window title may change back. If this is the case, simply add the previous line to /etc/.bashrc |