pentagram

Tagged: code RSS Toggle Comment Threads | Keyboard Shortcuts

  • hamstar 7:28 pm on April 7, 2012 Permalink | Reply
    Tags: code, github   

    Github is awesome, but its missing time tracking. There is a pretty cool looking service called Freckle but it costs money. I am poor. So I made this quick and dirty GreaseMonkey script for tracking time spent on git issues. It does require one to setup a couple of very simple server side scripts though.

     
  • hamstar 4:01 am on March 11, 2012 Permalink | Reply
    Tags: code, git   

    Change git history 

    Here’s the way to change your git history (I found it here):

    git rebase -i HEAD~3

    Then you should see this in a text editor:

    pick dd56df4 added support for rocket launchers
    pick 36c7dba made it power up the hand thrusters when fingers are splayed
    pick 7482e0d added heat seeking targeting system

    Change the word pick to edit of the commit that you want to edit and save/exit the editor and you will see this:

    Stopped at 7482e0d... added heat seeking targeting system

    7482e0d is now the last commit so you can now amend stuff to it. If you want to add a file to the commit add it in now:

    git add targeting/friendly_detection.c

    All done? Amend the commit:

    git commit --amend

    Then you are given a chance to edit the commit message, but you can just exit the editor if you want to keep it the same.

    Now you just need to rebase it:

    git rebase --continue

    And you’re done!

     
  • hamstar 4:13 pm on March 10, 2012 Permalink | Reply
    Tags: code, design patterns, php   

    PHP Design Patterns 

    This page http://blog.ircmaxell.com/2012/03/handling-plugins-in-php.html has some nice descriptions on design patterns (in PHP).

     
  • hamstar 11:14 pm on March 9, 2012 Permalink | Reply
    Tags: code, linux commands   

    This is handy for finding files between a certain date range…

    touch --date "2007-01-01" /tmp/start
    touch --date "2008-01-01" /tmp/end
    find /data/images -type f -newer /tmp/start -not -newer /tmp/end

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel