Monday, December 12, 2011

Downloading Eve Online files overnight

  1. Disable sleep in Power Management preferences.

  2. Go to downloads directory.

    $ cd ~/Downloads
  3. Set commands to run at midnight. Files are taken Eve Online's offline installer download page.

    $ at midnight
    warning: commands will be executed using /bin/sh
    at> wget -c http://content.eveonline.com/323364/EVE_Online_Installer_323364.exe
    at> wget -c http://content.eveonline.com/323364/eveonline_323364_1of2.7z
    at> wget -c http://content.eveonline.com/323364/eveonline_323364_2of2.7z
    at> ^D<EOT>
    job 6 at Tue Dec 13 00:00:00 2011
    
  4. Go to bed!

  5. Re-enable sleep in Power Management preferences.

Note: Ideally would sleep when complete, but doing so probably requires some work with sudo.

Wednesday, December 7, 2011

Branching and unbranching in Git

I wanted to create a temporary branch for a piece of work.

# Make some changes...

# Oops, need a new branch!
git branch mybranch
git checkout mybranch
git commit

# Make and commit more changes...

# Send branch changes to remote repo.
git push origin mybranch

# All done, time to merge back.
git checkout master
git pull --rebase origin master
git merge mybranch
git commit -a
git push origin

# Remove branch locally and on remote repo.
git branch -d mybranch
git push origin :mybranch