(╯°□°)╯︵ ┻━┻

Don't take life too seriously. You'll never get out of it alive.

Time for a new start

So I haven’t posted anything for 4 years and I think it’s time for a fresh start. Nowadays I work as a Salesforce Consultant and I will try to share any knowledge I get about the force.com platform and hopefully it will be helpful. As any other developer I learn a lot of things by reading blogs and Stackoverflow so I’m hoping to give back in some way to the community.

Mass deleting picklist values in Salesforce with AJAX javascript hack

I have written an updated version of this post Mass deleting picklist values in Salesforce with AJAX javascript hack (2018 version) Today I was gonna do a small change in our Salesforce instance, namely replacing to 1100+ picklists with brand new values. Last time I did this I used Eclipse and just saved the file (Lead.object for example). But I realized that only new values are added and old ones are not removed and as usual there are number of requests on success.

Why you should have a theme song (or why it is important to be happy at work)

Long time no see, a lot has happened and at the moment I work in Stockholm and live in a basement which is perfect. I have thought about this many times before and this morning it struck me once again: You should have a theme song in your head when you wake up and on your way to work. Say what? Is probably the sane reaction to my last sentence but let me explain.

Using SHA-1 to generate passwords

This is probably the worst thing about the Internet, remembering passwords. Until about a year ago I had the same password for almost every service, sometimes I spiced it up by adding a character in the start representing the service (F for facebook, G for Gmail and so on). A colleague had a different approach, he used simple “passwords” which he then computed SHA-1 on. He had developed a simple java script that performed the SHA-1 conversion.

Polygon with holes in aggdraw

Drawing polygons with holes have haunted me for a while and recently I had to do it in Python with PIL. Googling the subject gives you a hint. This code: import os import Image import aggdraw draw = aggdraw.Draw('RGB', (100, 100), 'white') path = aggdraw.Path() path.moveto(10, 10) path.lineto(10,60,60,60) path.lineto(60,10) path.lineto(10,10) path.moveto(20,20) path.lineto(40,20) path.lineto(40,40) path.lineto(20,40) path.lineto(20,20) pen = aggdraw.Brush("black") draw.path((25, 25), path, pen, None) img = Image.fromstring('RGB', (100, 100), draw.tostring()) p = os.