Skip to content

Instantly share code, notes, and snippets.

View akora's full-sized avatar

Andras Kora akora

View GitHub Profile
@akora
akora / disable-iPhoto-face-recognition.sh
Last active January 12, 2017 10:57
Disable iPhoto's face recognition on Mac OS X Yosemite. Run from command line.
defaults write com.apple.iPhoto PKFaceDetectionEnabled 0
# then right click your PhotoLibrary in Finder (in your Pictures folder) and remove the following files:
# Faces.db (in Pictures/iPhoto Library/Database/apdb)
# Faces folder (in Pictures/iPhoto Library/Database)
@akora
akora / virtualbox-shared-folder-on-debian
Last active January 4, 2016 19:29
Debian 7 VirtualBox shared folder setup in /etc/fstab
<SharedFolderName-on-host-OS> /home/<username>/shared vboxsf defaults,rw,uid=1000,gid=1000 0 0
@akora
akora / static-IP-on-debian
Last active August 29, 2015 14:15
Set up static IP address on Debian. Edit /etc/network/interfaces
auto lo
iface lo inet loopback
# IPv4 address
iface eth0 inet static
address 192.168.xxx.xxx
netmask 255.255.255.0
network 192.168.xxx.0
broadcast 192.168.1.255
gateway 192.168.xxx.1
@akora
akora / turn-off-IPv6-on-debian
Created February 16, 2015 04:08
Turn off IPv6 on Debian. Edit /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
@akora
akora / parallels-dhcp-leases-mac.sh
Last active March 30, 2017 14:16
Location of the Parallels DHCP lease file on Mac OS X Yosemite. It's editable when Parallels is not running.
cat /Library/Preferences/Parallels/parallels_dhcp_leases
@akora
akora / two-line-prompt-mac-cli.sh
Last active August 29, 2015 14:15
Two-line prompt for Mac OS X command line, for long paths. Tested in iTerm2.
# previous one line version
# PS1='\[\e[44;36m\][\u@\h \w] $\[\e[0m\] '
color_blue="\[\e[44;36m\]"
path_short="\w"
color_reset="\[\e[0m\]"
new_line="\n"
PS1="$color_blue$path_short$color_reset$new_line[\u@\h] $ "