Skip to content

Instantly share code, notes, and snippets.

View apisznasdin's full-sized avatar

Hafidz Nasruddin apisznasdin

View GitHub Profile

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 / 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
--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'
file_1 = open("input.txt", "r")
file_2 = open("output.txt","r+")
mylist = sorted(file_1.read().split(','), key=str.lower)
for line in mylist:
file_2.write(","+line)
file_1.close()
file_2.close()
@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
@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 / 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

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: