Skip to content

Instantly share code, notes, and snippets.

View apisznasdin's full-sized avatar

Hafidz Nasruddin apisznasdin

View GitHub Profile
@apisznasdin
apisznasdin / check duplicate on ext_name field
Last active December 25, 2015 03:59
select statement to find duplicates on ext_name in ew_process_instance table
select ext_name, count(*)
from ew_process_instance
group by ext_name
having count(*) > 1;
@apisznasdin
apisznasdin / delete .svn
Created October 11, 2013 04:11
Recursively Delete .svn Directories
find . -type d -name .svn -exec rm -rf {} \;
@apisznasdin
apisznasdin / Config file for sSMTP sendmail
Created January 24, 2014 08:19
Config file for sSMTP sendmail using Mandrill
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=user@domain.com
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.mandrillapp.com:587
@apisznasdin
apisznasdin / nginx-blacklist.conf
Last active May 19, 2019 04:54
This file implements a blacklist for certain user agents and referrers. It's a first line of defense. It must be included inside a http block in nginx configuration file.
### This file implements a blacklist for certain user agents and
### referrers. It's a first line of defense. It must be included
### inside a http block.
# based from https://github.com/perusio/piwik-nginx/blob/master/blacklist.conf
# blacklist from http://perishablepress.com/2013-user-agent-blacklist/
## Add here all user agents that are to be blocked.
map $http_user_agent $bad_bot {
default 0;
@apisznasdin
apisznasdin / gist:9318693
Created March 3, 2014 05:01
Configure Linux to used Windows Proxy
# Refer http://www.w3schools.com/tags/ref_urlencode.asp for URL-encoding for ASCII Character if used in password eg
# %23 = #
# %40 = @
# %5C = /
#
# example http://putrajaya/apisznasdin:password@proxysvr:8080
export http_proxy=http://domain%5Cusername:password@proxysvr:8080
export https_proxy=http://domain%5Cusername:password@proxysvr:8080
export ftp_proxy=http://domain%5Cusername:password@proxysvr:8080
@apisznasdin
apisznasdin / locale
Created March 14, 2014 04:37
/etc/default/locale
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8

Keybase proof

I hereby claim:

  • I am apisznasdin on github.
  • I am hafidz (https://keybase.io/hafidz) on keybase.
  • I have a public key whose fingerprint is 2CF2 4A73 9FE5 F1A1 30C0 6705 3CE8 82E5 BD99 64B8

To claim this, I am signing this object:

@apisznasdin
apisznasdin / auto_master
Created January 21, 2015 09:46
OSX Yosemite Automount NAS Share settings
# /etc/auto_master
#
# Automounter master map
#
+auto_master # Use directory service
/net -hosts -nobrowse,hidefromfinder,nosuid
/home auto_home -nobrowse,hidefromfinder
/Network/Servers -fstab
/Users/username/Documents/Shares auto_resources
/- -static
@apisznasdin
apisznasdin / apache2
Created July 13, 2015 04:21
Apache2 rc init script
APACHE_HOME=/usr/local/apache2
CONF_FILE=${APACHE_HOME}/conf/httpd.conf
RUNDIR=/var/run/apache2
PIDFILE=${RUNDIR}/httpd.pid
if [ ! -f ${CONF_FILE} ]; then
exit 0
fi
if [ ! -d ${RUNDIR} ]; then
@apisznasdin
apisznasdin / apache
Created July 13, 2015 04:28
Apache rc init script
#!/sbin/sh
#
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use subject to license terms.
#
#ident "@(#)apache.sh 1.6 08/04/04 SMI"
APACHE_HOME=/usr/apache
CONF_FILE=/etc/apache/httpd.conf
RUNDIR=/var/run/apache