Automatic deployment to Google Cloud Functions

In this post I’ll show you how to achieve a Heroku-like push-to-deploy capability on Google Cloud Functions. If you don’t know Google Cloud Functions (GCF), it’s a serverless architecture for running services on Google’s services. It’s equivalent to AWS Lambda. You can read about it here. Goal Pushing any code to the master branch of our Github repository should automatically trigger a deploy of our new code to GCF. »

Generate a random order-number

For one of my projects, I needed to generate a random order number that will be sent to customers in an email after they order. Lots of companies do that, it usually looks like this: Requirements Has to be all digits. Needs to be unique. We don’t want two orders to have the same order number. Has to be random - i.e. not enumerable. We don’t want the orders to be consecutive for example (5001, 5002, 5003, …) so that people can’t guess other orders numbers. »

Passwordless login in mobile apps

This post touches some problems with traditional email logins in mobile apps and suggests a different approach to handle login without requiring the user to enter any password. The post is not very technical. Other than occasionally mentioning “client / server” it doesn’t talk about any specific framework / language. Instead, it tries to explain the overall flow and behaviour of passwordless login in mobile apps. I might add some additional framework specific code examples later but for now it’s mostly ideas. »

Export all Google Sheets to csv

I had a Google Apps spreadsheet with around 40 sheets. Wanted to export them to csv. Unfortunately Google only lets you export one sheet at a time. Here’s a script that exports all sheets in a spreadsheet to csv To use, click on tools –> script editor. Then create a new blank script and paste the code there. Click on the play button (run) and go back to your spreadsheet. »

Approaches to JSON internationalisation (i18n)

I needed to create an API that is capable of serving objects with strings in more than one language. Let me present the problem with an example. Lets assume that we have a web app or a mobile client that wants to get information about coffee shops around the city. Also, lets assume also that we are going to have to support two languages, English and Hebrew (I know, right ? »

Export mongodb collections to csv without specifying fields

Sometimes you might want to export your Mongodb database in csv format. If you have many collections, it can be a bit of a hassle since mongoexport requires you to specify each field you want to be exported with the --fields attribute and you have to do it for each collection seperately. Here’s a little bash script that will do the work for you. Result is a .csv file for each collection you have in your db. »

How to create a clearable autocomplete dropdown with AutoCompleteTextView

I wanted to create a nice search box with autocomplete results dropdown in the ActionBar. I could have used the SearchView widget but I didn’t want to create a searchable activity and all the necessary overhead. Instead I used a more lightweight approach with AutoCompleteTextView. I’ll explain here the steps needed to be done in order to make it work. My model app was the Gmail app which looks like this : »

Author image Michael DeRazon on #android,

i18n for Node + Express

In this post i’m going to demonstrate a simple way to add multi language support to a node + express project. Simple server Lets start with a simple server: We first require express, then we tell express where to look for our templates files. In this case I used ejs as the template engine. I like it because it’s syntax is basically html with special <% ... %> syntax for embedding code from the server. »

חתונה אזרחית בגיברלטר

התחתנו כמו רבים וטובים בטקס אזרחי בארץ. תיכננו ירח דבש בספרד ועל הדרך חשבנו שיהיה נחמד להתחתן בגיברלטר כדי שנוכל להירשם בארץ כנשואים. למה גיברלטר ? נמצא בדרום ספרד, באזור שבו רצינו לטייל. מאד מקלים על התהליך. לא יקר מדיי. טקס באנגלית, פחות בלאגן בתרגום. סה”כ היה קליי קלות, באמת. אז הנה הפרטים. מסמכים דרושים תמצית רישום של כל אחד מבני הזוג ממשרד הפנים להראות שאתם רווקים (אפשר להזמין באינרנט, לוקח בערך שבוע להגיע). »