Instantly share code, notes, and snippets.

Hussain Fakhruddin hussainanjar

View GitHub Profile
# Count IP address from nginx log file
sudo awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -nr
View jenkins.nginx.conf
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /var/run/;
events {
worker_connections 1024;
View AmazonSESSample.groovy
import java.util.Properties
import javax.mail.*
import javax.mail.internet.*
final String FROM = "SENDER@EXAMPLE.COM" // Replace with your "From" address. This address or domain must be verified.
final String TO = "RECIPIENT@EXAMPLE.COM" // Replace with a "To" address. If your account is still in the
// sandbox, this address must be verified.
View UrlMappings.groovy
View CustomValidationTagLib.groovy
import groovy.xml.MarkupBuilder
import org.apache.commons.lang.StringEscapeUtils
import org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib
class CustomValidationTagLib extends ValidationTagLib {