AWS keyWatcher


We have seen multiple times that users accidentally expose their AWS access key and secret key on Internet, e.g. GitHub. This is a really dangerous thing, as whoever get that key can do whatever you can do to your AWS account. Here are two examples, the exposed key was used by someone unknown to create … Continue reading AWS keyWatcher

Advertisements

Run query via Sumologic API


SumoLogic query can also be run via API. Here is a bash example that I wrote to get the nginx access logs. By default it searches the logs in the past 10 minutes, but you can overwrite it by adding a parameter. Here is the script. It is also can be found in my github. #!/bin/bash … Continue reading Run query via Sumologic API

Apache mod_rewrite URL redirect script


I wrote a bash script to automate the Apache (mod_rewrite) URL redirection. It supports 3 types of redirection: - One to One: eg. From http://jackiechen.local/mylab To http://jackiechen.org./mylab - Any to One: eg. From http://jackiechen.local/* To http://jackiechen.org - Any to Any: eg. From http://jackiechen.local/$1 to https://jackiechen.org/$1 The script can be downloaded from here Note: I tested … Continue reading Apache mod_rewrite URL redirect script