Think In Geek

In geek we trust

Author Archive

Serverless framework: a small example

Use case I’ve been willing to give the serverless framework a try for a while, and recently I came up with a small side project that was a potential good fit for it. I am a Monzo user, and I use their card to pay for things like my weekday lunches around the office or […]

, ,

Setting and deleting cookies in Go

In this post we’ll learn how to set and delete cookies as part of your Go HTTP Handlers. We’ll also learn one way to test our handlers using HTTP recorders.

,

Redirect parts of your website to different applications with Apache

Microservices everywhere. Those are the times we live in now. Everyone seems to be splitting monolithic web applications into smaller chunks. And that’s fine. However, setting up the local development environment for this can be sometimes a bit cumbersome.

,

A small Telegram Bot in Go

I started using Telegram a few years ago. Most of the time I don’t use it much to have 1 to 1 conversations but rather chat in a small group of friends which I’ve known for a while now. Every now and then, we share some links to Twitter on that group, and unfortunately the […]

TinyMCE checkbox toggler for jQuery

Here’s a small jQuery code snippet that you can use to have an easy to use checkbox toggler to enable or disable a TinyMCE editor with ease (tested on TinyMCE version 4 and jQuery version 2.1.1). It’s really easy to use. You just need to create a checkbox element with the class tiny_mce_toggler and a […]

, ,

How to create and configure EC2 instances for Rails hosting with CentOS using Ansible

Introduction In this quite extensive post I will walk you through the process of creating from scratch a box in EC2 ready to use for deploying your Rails app using Ansible. In the process I will show how to write a simple module that, while not necessary, will illustrate some points as well. Keep in […]

, , , , , , , , , , ,

Check progress of a mysql database import

If you’ve ever had to do a huge mysql import, you’ll probably understand the pain of not being able to know how long it will take to complete. At work we use the backup gem to store daily snapshots of our databases, the main one being several gigabytes in size. This gem basically does a […]

, ,

Create a temporary zip file to send as response in Rails

We have been doing a painful migration from Rails 2 to Rails 3 for several months at work, and refactoring some code the other day I had to do something in a non straightforward way, so I thought I’d share that. Basically we had an action that would group several files into a zip file […]

, ,

acts_as_list gem and single table inheritance in Rails

If you ever need to use the acts_as_list gem in Rails on a model that uses single table inheritance, here’s the snippet you need to use for the list methods to work if you want the setup done on the base model: acts_as_list :scope => [:type]acts_as_list :scope => [:type] You’ll need to use the array […]

, ,

Check_MK, software updates and mount options alarms

We have been using nagios (more specifically Check_MK) recently at work to get some monitoring information on our CentOS instances. Recently we decided to reprovision all of our EC2 instances to apply several security upgrades. Among the packages upgraded, there was the kernel (which I guess was the cause of our subsequent problems). After updating […]

, , , , ,

Previous Posts