Ognjen Regoje bio photo

Ognjen Regoje
But you can call me Oggy


I make things that run on the web (mostly).
More ABOUT me and my PROJECTS.

me@ognjen.io LinkedIn
Check out
The Marketplace Guide
A collection of lessons for the early stages of building a marketplace startup.
https://themarketplace.guide

POSTS RSS

Interesting interview question: What kind of bonus do you prefer?

I forget where or how I got this idea but I think an intersting interview question might be “What kind of bonus do you prefer? Fixed or as rewards for specific things you do?”I’... (584)

Using Elasticsearch results to generate cache keys in Rails

A pretty neat thing I realized while building the search for Supplybunny is that you can use the results from elastic search to generate the cache keys that rails generates.The ... (456)

Building human readable link building in Rails

A while ago I needed to improve the canonical links for some of our pages, specifically because we added more search parameters etc. so I made use of routes file to create some ... (445)

Using multiple updated_at timestamps for caching in Rails

It sounds so obvious when spelled out but you can use multiple timestamps in Rails models that each individually can serve as cache keys for different views. For example say you... (641)

One line deployment for Jekyll sites

A great way to deploy a Jekyll site using just rsync. First, build (jekyll b) the site locally and then rsync the _site folder:rsync -av -e 'ssh -i ~/.ssh/id_passwordless_rsa' -... (171)

The key to SEO as with content marketing is to be genuine

A while back Supplybunny.com reached a point where we had enough products to justify a more thorough SEO review. The main objective of this was to increase traffic acquisition w... (733)

The key to content marketing is to be genuine -- with examples

I’ve noticed two examples of content marketing done right. I suppose I didn’t notice content marketing gone wrong simply because if it’s done incorrectly it wont actually be not... (426)

Connecting to a private server using bastion settings

To log in to a server that is not exposed to the internet we can log in to one that is on the same network but is exposed to the internet and then ssh into the private one. We’d... (173)

Connecting the Split gem to password protected redis

Split config accepts a host string directly as well as an instance of Redis. Therefore, we can use Redis to connect split to a password protected redis server. # config/initali... (74)

How to retry processing inbound messages on postmarkapp

In order to retry an inbound message that timed out, take a look at thePostmarkapp API documentation here.First, we need to get the server API token that can be found on the cre... (101)

Filling a number field in cucumber tests

In order to upload a file in a cucumber test, that is to use a file select input, define the following in your user_steps.rb: Then(/^I fill in number field "(.*?)" with "(.*?)"... (75)

Uploading a file in cucumber tests

In order to upload a file in a cucumber test, that is to use a file select input, define the following in your user_steps.rb: And(/^I attach "(.*?)" to "(.*?)"$/) do |field, fi... (67)

2016

Consistent display of dates in Rails

In order to consistently display dates in a Rails application the strftime format can be set globally.#config/initializers/time_formats.rbDate::DATE_FORMATS[:default] = "%d/%m/%... (59)

Count the number of elements in a jQuery nested attributes container

To count the number of elements that is in a jQuery nested attributes container we can extend the plugin to have the following method (coffeescript): itemCount: -> @$item... (86)

Disabling Ctrl+w from closing Visual Studio Code window

To disable ctrl+w from closing the Visual Studio Code add the following to the keyboard shortcuts file: { "key": "ctrl+w", "when": "!editorIsOpen" }The keyboard shortcuts file ... (55)

Devise: Sending a reset password link as part of a welcome email

Occasionally you’d need to have a user who’s not registered preform an action and only enter their email address the result of which creates an account. For example when you wan... (236)

Supplybunny got funded

Supplybunny.com, the HORECA marketplace for food supplies and ingredients that I cofounded and built the tech just closed US$300K (~RM1.2 million) in seed funding from Gobi Part... (44)

2015

Rails Authentication: Devise with LDAP with multiple configs and database authenticatable

Update two years later: In the two years since this was made (and this post written)there have been no issues related to the login. Both the database and the LDAP logins stillwo... (1944)

Very quickly adding swap to Ubuntu 14.04

Following is the quickest way to add swap space to Ubuntu 14.04 installation. I amwriting the post because I keep having to look this up and given the convenience andprice of Di... (164)

‹ newer