Stay ahead with the latest trends in custom software development. Explore how AI, automation, and cloud solutions are shaping the future of business technology.
Step 1 If you are using debian or ubuntu, install the mod-geoip package. sudo apt-get install libapache2-mod-geoip Step 2 Enable GeoIPEnable, edit geoip.conf /etc/apache2/mods-enabled/geoip.conf GeoIPEnable On Step 3 Find Country Code Lookup: https://en.wikipedia.org/wiki/ISO_3166-1 In Apache vhosts file, outside of the </Directory> tags: <Location /> ##ISO 3166 Country Codes ## Block China ## Block Costa […]
Group data in MySQL every N hours Using the hour to aggregate.. in this example every 3 hours. select * from tbl_sometable group by floor(hour(time) / 3);
Put the following in /etc/profile: The script /etc/profile is executed at every login (for bash shell users). if [ -n "$SSH_CLIENT" ]; then TEXT="$(date): ssh login to ${USER}@$(hostname -f)" TEXT="$TEXT from $(echo $SSH_CLIENT|awk '{print $1}')" echo $TEXT|mail -s "ssh login" you@your.domain aFrom:youradd@email.com fi If you have issues delivering mail to a GMAIL inbox, […]