Skip to content

Instantly share code, notes, and snippets.

View akora's full-sized avatar

Andras Kora akora

View GitHub Profile
@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] $ "
@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 / 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 / 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 / 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 / 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 / install-flash-plugin-on-debian7-kde.sh
Created February 16, 2015 18:10
Install Flash plugin (for Chrome) on Debian 7 KDE
sudo echo "deb http://ftp.dk.debian.org/debian wheezy-backports main contrib" >> /etc/apt/sources.list
sudo apt-get update
sudo aptitude -t wheezy-backports install pepperflashplugin-nonfree
@akora
akora / install-packer-on-mac-os.sh
Last active September 7, 2020 18:37
Install packer on Mac OS
curl -O -L https://dl.bintray.com/mitchellh/packer/packer_0.7.5_darwin_amd64.zip
unzip packer_0.7.5_darwin_amd64.zip
sudo mv packer_0.7 /usr/local/packer
sudo chown $USER /usr/local/packer/
# then update your .bash_profile with the new path e.g.:
# export PATH="/usr/local/git/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/local/packer:$PATH"
@akora
akora / mac-os-git-aware-bash-prompt.sh
Created February 22, 2015 16:57
Mac OS Yosemite Git aware (two-line) bash prompt
# settings for the main prompt
BLUE="\[\e[44;36m\]"
PATH_SHORT="\w"
COLOR_RESET="\[\e[0m\]"
NEW_LINE="\n"
# RAG colors indicating git status
RED="\[\033[0;31m\]"
AMBER="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
@akora
akora / remove-formatting-clipboard-content-yosemite
Last active August 29, 2015 14:15
Remove formatting of clipboard content (turning it into plain text) when copy-pasting - Mac OS Yosemite
Open 'System Preferences'
Select 'Keyboard'
Select tab 'Shortcuts'
Select 'App Shortcuts' from the left listbox
Click '+' below right listbox
Select 'All Applications' for 'Application' input box
Type 'Paste and Match Style' into the 'Menu Title' input box