Quick Tip: AirDrop on all network interfaces

If You, like me, want to use AirDrop also on ethernet network and not just Wi-Fi fire up Terminal:

defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1
killall Finder

That’s all You need Folks! Now You can use AirDrop on every network interface! How cool is that?


Git – setting up a remote repository and doing an initial “push”

There is a great deal of documentation and many posts on Git out there, so this is more of a note for myself as I keep forgetting the steps needed to set up a remote repository and doing an initial “push”.

So, firstly setup the remote repository:

ssh git@example.com
mkdir my_project.git
cd my_project.git
git init --bare
git-update-server-info # If planning to serve via HTTP

On local machine:

cd my_project
git init
git add *
git commit -m "My initial commit message"
git remote add origin git@example.com:my_project.git
git push -u origin master


Team members can now clone and track the remote repository using the following:

git clone git@example.com:my_project.git
cd my_project


To have your terminal prompt display what branch you are currently on in green, add the following to your ~/.bash_profile:

function parse_git_branch_and_add_brackets {
  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \[\1\]/'
PS1="\h:\W \u\[33[0;32m\]\$(parse_git_branch_and_add_brackets) \[33[0m\]\$ "

If You made a mistake and want to edit remote origin address just vim .git/config and You are all done.


Centos 6 – Adding EPEL repository

wget http://ftp.ps.pl/pub/Linux/fedora-epel/RPM-GPG-KEY-EPEL-6
rpm --import RPM-GPG-KEY-EPEL-6

Now create /etc/yum.repos.d/EPEL.repo and paste:

name=EPEL RPM Repository for Red Hat Enterprise Linux

Now when You want to use repository You just do it like this:

yum --enablerepo=epel install [pakage]