Joined September 2011


Ruby developer at Veritrans
Ruby developer
Jakarta, Indonesia

To have less env variables can pass it in URL format:

  smtp_url = URI.parse(ENV["SMTP_URL"])
  self.smtp_settings = {
    port:      smtp_url.port,
    user_name: smtp_url.user ? URI.decode_www_form_component(smtp_url.user) : nil,
    password:  smtp_url.password,
    enable_starttls_auto: Rack::Utils.parse_nested_query(smtp_url.query)['tls'].in?(['true', '1', 1, true, 'True', 'TRUE'])

There is a difference between for and forEach. for will local reassign variable for every run, while forEach will create new variable. Example:

var links = document.getElementsByTagName('a');
for(var i = 0; i < links.length; i++) {
  var element = links[i];
  element.addEventListener('click', function () {
    alert(element.innerText); // you think it will be element you clicked on? It will be last element in array

I find this useful for me:

ObjectKit.forEach = function Object_forEach (object, callback) {
  for (var key in object) {
    if (object.hasOwnProperty(key)) callback(key, object[key]);
Posted to Continuous testing for D over 1 year ago
Posted to iTunes 12 blue icon over 1 year ago

Thank you for link. It's almost same with manual I mentioned, paste image in "get info" window. For me it worked only if I open icon in and copy image (not a file)

191 Karma
24,577 Total ProTip Views