Skip to content

Instantly share code, notes, and snippets.

@eliasby
eliasby / remove_duplicates.sh
Created August 26, 2015 10:17
Remove duplicates from file
cat file.txt | sort | uniq -d
@eliasby
eliasby / composer_clear_cache.sh
Last active August 29, 2015 14:07
Clear composer cache
rm -rf "`composer config cache-dir`"
@eliasby
eliasby / setup_git.sh
Last active August 29, 2015 14:08
Setup Git for the first time
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
@eliasby
eliasby / freebsd_remove_dep.sh
Last active August 29, 2015 14:08
FreeBSD: Remove useless dependencies after removing a package
pkg delete package
pkg autoremove
@eliasby
eliasby / freebsd_install_amp.sh
Created October 23, 2014 13:06
FreeBSD: Install AMP
cd /usr/ports/www/apache22
make install clean
cd ../../lang/php5
make install clean
cd ../../databases/mysql55-server
make install clean
@eliasby
eliasby / generate_ssh_key.sh
Created October 23, 2014 15:01
Generate SSH key
ssh-keygen -t rsa -C "your_email@example.com"
@eliasby
eliasby / oh_my_zh.sh
Created October 23, 2014 20:51
oh my zh
curl -L http://install.ohmyz.sh | sh
@eliasby
eliasby / vbox.sh
Created October 24, 2014 08:13
Managet VBox VMs with command line
VBoxManage list runningvms
VBoxManage controlvm <uuid> poweroff
VBoxManage unregistervm <uuid>
@eliasby
eliasby / vbox_stop_all_running_vm.sh
Created October 24, 2014 08:13
VBox stop all running VMs
VBoxManage list runningvms | awk '{print $2;}' | xargs -I vmid VBoxManage controlvm vmid poweroff
@eliasby
eliasby / set_global_gitignore.sh
Created October 24, 2014 13:35
Set global gitignore
git config --global core.excludesfile '~/.gitignore'