Category Archives: Programming

Removing Github Commits

By | May 3, 2017

To rewrite history (not usually a good thing to do) you can do the following: git reset –hard <commit hash> git rebase -i HEAD~2 (the 2 goes back 2 commits) git push origin +master refresh github and you should see your commits disappear.

Hello World HTML

By | May 3, 2017

In case you forget how to create the most basic html page ever, here is a reminder:   <html> <header> <title>This is title</title> </header> <body> Hello world </body> </html>  

How do callbacks work?

By | April 14, 2017

Confused about how callbacks work? Check out this really neat example. def say_hello(value, callback): print value callback() def say_name(): print “Fra” say_hello(“ciao”, say_name) Ref: https://bytesforlunch.wordpress.com/2012/03/15/simple-callback-implementation-in-python/

Neat site for svg icons

By | February 17, 2017

This site http://www.flaticon.com has a whole bunch of cool svg for download. SVG stands for Scalable Vector Graphics and uses XML to draw images that do not lose resolution when scaled up. To test your SVG, this site here is very handy https://www.w3schools.com/html/tryit.asp?filename=tryhtml_svg_circle

The White Space Phenomenon

By | November 6, 2016

As a developer, one of the worst problems to encounter is the white space problem. In recent memory I’ve encountered this 2 times. Once in 2013 when integrating with MYOB, a trailing white space at the end of a variable caused an http 400 error which was a complete mystery at the time. The second time… Read More »