Skip to content

Instantly share code, notes, and snippets.

View apisznasdin's full-sized avatar

Hafidz Nasruddin apisznasdin

View GitHub Profile
--exclude='$RECYCLE.BIN' --exclude='$Recycle.Bin' --exclude='.AppleDB' --exclude='.AppleDesktop' --exclude='.AppleDouble' --exclude='.com.apple.timemachine.supported' --exclude='.dbfseventsd' --exclude='.DocumentRevisions-V100*' --exclude='.DS_Store' --exclude='.fseventsd' --exclude='.PKInstallSandboxManager' --exclude='.Spotlight*' --exclude='.SymAV*' --exclude='.symSchedScanLockxz' --exclude='.TemporaryItems' --exclude='.Trash*' --exclude='.vol' --exclude='.VolumeIcon.icns' --exclude='Desktop DB' --exclude='Desktop DF' --exclude='hiberfil.sys' --exclude='lost+found' --exclude='Network Trash Folder' --exclude='pagefile.sys' --exclude='Recycled' --exclude='RECYCLER' --exclude='System Volume Information' --exclude='Temporary Items' --exclude='Thumbs.db'

Keybase proof

I hereby claim:

  • I am apisznasdin on github.
  • I am hafidz (https://keybase.io/hafidz) on keybase.
  • I have a public key ASD2jHrJteweWPiXwp29GL0321_7P3kIZ7HqOXE1pHdFFwo

To claim this, I am signing this object:

@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 / 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 / yum.conf proxy setting
Created July 13, 2017 01:25
yum via proxy server
echo 'proxy=http://proxysvr.putrajaya.local' > /etc/yum.conf
@apisznasdin
apisznasdin / apt.conf proxy setting
Created July 13, 2017 01:13
apt via proxy server
echo 'Acquire::http::Proxy "http://proxysvr.putrajaya.local:8080";' > /etc/apt/apt.conf
@apisznasdin
apisznasdin / delete .svn
Created October 11, 2013 04:11
Recursively Delete .svn Directories
find . -type d -name .svn -exec rm -rf {} \;
@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 / PL2303 driver
Created July 15, 2015 20:35
PL2303 driver
air:~ hafidz$ ls /dev/cu.*
/dev/cu.Bluetooth-Incoming-Port
/dev/cu.usbserial
@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