Unix commandline

Published: Oct 29, 2014 Just a few scripts useful for changing many files at once. To replace all double quoted strings with single quoted strings in ruby to make rubocop happy: find . -type f -iname '*.rb' -exec sed -i.bak "s/\"/'/" "{}" +; Now find all the places where you do string interpolation and make them back to double quoted strings. Then to remove all .bak files when you are sure you got it right" ...

October 29, 2014 · Klaus Hebsgaard

Unix commandline

Published: Oct 29, 2014 Just a few scripts useful for changing many files at once. To replace all double quoted strings with single quoted strings in ruby to make rubocop happy: find . -type f -iname '*.rb' -exec sed -i.bak "s/\"/'/" "{}" +; Now find all the places where you do string interpolation and make them back to double quoted strings. Then to remove all .bak files when you are sure you got it right" ...

October 29, 2014 · Klaus Hebsgaard

EventBus in a Sinatra app

Published: Oct 27, 2014 I had a sinatra app (the Be My Eyes app), that I thought had a bit too much code in the route file. So I investigated how to make that better. What I came up with was that it would be great to have some kind of EventBus, where I could send events out and respond in a very decoupled manner. It would be nice to be able to run the event handlers asynchronous, but that was not a hard requiriment from the beginning. I searched on github and came up with event_bus by Kevin Rutherford. I asked on the lrug mail-list about peoples experience with event_bus. Not a lot of people had tried it out, be at least one person could recommend Kevins work, so I took the plunge and installed the gem. (Furthermore an I could see that a “sister” gem exists that will handle events in sidekick, so the asynchronous part got a checkmark as well) ...

October 27, 2014 · Klaus Hebsgaard

EventBus in a Sinatra app

Published: Oct 27, 2014 I had a sinatra app (the Be My Eyes app), that I thought had a bit too much code in the route file. So I investigated how to make that better. What I came up with was that it would be great to have some kind of EventBus, where I could send events out and respond in a very decoupled manner. It would be nice to be able to run the event handlers asynchronous, but that was not a hard requiriment from the beginning. I searched on github and came up with event_bus by Kevin Rutherford. I asked on the lrug mail-list about peoples experience with event_bus. Not a lot of people had tried it out, be at least one person could recommend Kevins work, so I took the plunge and installed the gem. (Furthermore an I could see that a “sister” gem exists that will handle events in sidekick, so the asynchronous part got a checkmark as well) ...

October 27, 2014 · Klaus Hebsgaard

Frontend developers and their tools

Published: Jun 23, 2014 I read some frontend developer magazines like [net magazine](http://www.creativebloq.com/net-magazine) and [Web Designer Magazine](http://www.webdesignermag.co.uk/). Now I really like both of them, and so I thought about how great it would be to have something like that for backend developers (or maybe full stack developers). And I thought about why it is that no such magazine exist. Then it struck me how seperated the backend developers are vs the frontend developers. I have seen many frontend developers who jumped from python to .net to ruby or whatever. On the other hand I don't see many backend developers jump around like that. A backend developer would be considered as a ".Net developer" or a "Ruby on Rails developer". So one could not make a magazine with Ruby, Python, .Net, Objectiv-c etc. and sell it. Cause each type of developer would look for something in their own space. ...

June 23, 2014 · Klaus Hebsgaard

Frontend developers and their tools

Published: Jun 23, 2014 I read some frontend developer magazines like net magazine and Web Designer Magazine. Now I really like both of them, and so I thought about how great it would be to have something like that for backend developers (or maybe full stack developers). And I thought about why it is that no such magazine exist. Then it struck me how seperated the backend developers are vs the frontend developers. I have seen many frontend developers who jumped from python to .net to ruby or whatever. On the other hand I don’t see many backend developers jump around like that. A backend developer would be considered as a “.Net developer” or a “Ruby on Rails developer”. ...

June 23, 2014 · Klaus Hebsgaard

Git bisect

Published: May 31, 2014 Oh how I love git bisect In the last couple of weeks I had some bugs that were introduced at a unknown commit. Actually I couldn’t even find out what code was working wrong. I did however know excactly what was wrong in the UI. For problems like this git bisect is perfect. What git bisect does is it helps you do a binary search in the commits and find the buggy commit. ...

May 31, 2014 · Klaus Hebsgaard

Git bisect

Published: May 31, 2014 Oh how I love git bisect In the last couple of weeks I had some bugs that were introduced at a unknown commit. Actually I couldn’t even find out what code was working wrong. I did however know excactly what was wrong in the UI. For problems like this git bisect is perfect. What git bisect does is it helps you do a binary search in the commits and find the buggy commit. ...

May 31, 2014 · Klaus Hebsgaard

My Mac Setup

Published: May 19, 2014 This is just a run through of my Mac setup - I do this mostly for myself, so I can find it whenever I need to setup a Mac, but you are welcome to take a peek :-) First of all Caps Lock (I never hit Caps Lock except by mistake): PC Keyboard Hack is an excellent tool for mapping your Caps Lock key. Funny enough in the settings of OS X, you cannot map Caps Lock to Esc, so you need an external tool for this. ...

May 19, 2014 · Klaus Hebsgaard

My Mac Setup

Published: May 19, 2014 This is just a run through of my Mac setup - I do this mostly for myself, so I can find it whenever I need to setup a Mac, but you are welcome to take a peek :)- First of all Caps Lock (I never hit Caps Lock except by mistake): PC Keyboard Hack is an excellent tool for mapping your Caps Lock key. Funny enough in the settings of OS X, you cannot map Caps Lock to Esc, so you need an external tool for this. ...

May 19, 2014 · Klaus Hebsgaard