Skip to content

Instantly share code, notes, and snippets.

Hussain Fakhruddin hussainanjar

Block or report user

Report or block hussainanjar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hussainanjar
hussainanjar / commands.sh
Last active Aug 29, 2017
Useful Commands
View commands.sh
# Count IP address from nginx log file https://www.mkyong.com/nginx/count-ip-address-in-nginx-access-logs/
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/nginx.pid;
events {
worker_connections 1024;
}
@hussainanjar
hussainanjar / AmazonSESSample.groovy
Created Nov 18, 2015
Groovy script to send email using Amazon SES
View AmazonSESSample.groovy
@Grab('javax.mail:mail:1.4.7')
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.
@hussainanjar
hussainanjar / UrlMappings.groovy
Created May 25, 2014
URL Mapping entris to initial angular apps
View UrlMappings.groovy
"/"(view:"/blog/index")
"/admin"(view:"/admin/index")
@hussainanjar
hussainanjar / CustomValidationTagLib.groovy
Created Oct 6, 2011
Extension of Grails ValidationTagLib
View CustomValidationTagLib.groovy
package com.hussain.pf
import groovy.xml.MarkupBuilder
import org.apache.commons.lang.StringEscapeUtils
import org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib
class CustomValidationTagLib extends ValidationTagLib {
/**
You can’t perform that action at this time.