Skip to content

Instantly share code, notes, and snippets.

View anonoz's full-sized avatar
🎣
ikan duit

anonoz

🎣
ikan duit
View GitHub Profile
@anonoz
anonoz / singapore-relocation-tips.md
Created March 8, 2020 03:01
Singapore relocation tips for average people

Singapore relocation tips for average people

Banking

You know what... just start with Seedly blog post.

  1. Get a credit card as soon as you hit the minimum salary limit, debit cards are dangerous. I got my entire Maybank SG account emptied overnight and it took 3 months to recover that amount.
  2. You won't have CPF there when you are on a work pass, a typical Singaporean/PR has 31.5% of their paychecks forcibly saved (37%/117%). You can use StashAway, create a retirement goal and save that amount there.

Housing

@anonoz
anonoz / kl-coworking-reviews.md
Last active November 18, 2019 03:42
KL Coworking Spaces

KL coworking spaces reviews

Take note that I didn't visit every single one out there.

tl;dr (best to worst for every criteria)

If branch is not stated, it's because of my assumption that all branches will have similar quality in that aspect.

Crowd

// Google app script for google sheets!
/**
* Calculate Malaysia income tax for YA2020.
*
* @param {number} chargeable_income Income after all eligible tax deductions.
* @return The tax you have to pay
* @customfunction
*/
function MALAYSIA_TAX(amount) {
@anonoz
anonoz / hellogold.rb
Last active August 23, 2019 10:59
Check HelloGold AUM and HGT's yield
#!/usr/bin/env ruby
require 'json'
require 'open-uri'
require 'bigdecimal'
hg_json = JSON.parse(open('https://www.hellogold.com/data.json').read)
aum_grams = hg_json['data'].map { |a| a['gold_balance'] }.sum
gecko_json = JSON.parse(open('https://api.coingecko.com/api/v3/coins/hellogold?tickers=true&market_data=true&community_data=false&developer_data=false&sparkline=false').read)
# hgt_market_cap = BigDecimal(gecko_json['market_data']['market_cap']['usd'], 15)
@anonoz
anonoz / txt-01.md
Last active December 15, 2018 05:41
Get China work permit as Malaysian

trying to mess with scoot wifi

02:02AM SGT - I am currently on TR 734 SIN-TXL.

$ dig anonoz.com

; <<>> DiG 9.11.4-RedHat-9.11.4-1.fc28 <<>> anonoz.com
;; global options: +cmd
;; Got answer:
@anonoz
anonoz / Dockerfile
Created March 26, 2018 03:13
Sample of multistage Dockerfile for Rails app in production
FROM madnight/docker-alpine-wkhtmltopdf as wkhtmltopdf_savior
# STAGE for bundle & yarn install
FROM ruby:2.4.3-alpine3.7 as builder
ENV CA_CERTS_PATH /etc/ssl/certs/
ENV RAILS_ENV production
ENV RAILS_LOG_TO_STDOUT true
ENV RAILS_SERVE_STATIC_FILES true
@anonoz
anonoz / Dockerfile
Last active July 23, 2017 18:25
Dockerfile for you to test Webpacker-enabled Rails including yarn, phantomjs on circleci v2
FROM ruby:2.4.1
# nodejs
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash -
# yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -\
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# finally the rest

The Incomplete Study Guide for RoR Interviews Outside Malaysia

This gist serves as a reminder for myself or for anyone who has found this on what to prepare. At this point, I have failed approximately 5 interviews (and counting) in Singapore, China, and Hong Kong. On the bright side, doing interviews allowed me to find out the gaps I have in my programming knowledge.

Take note:

  1. Just because there are questions I notice being asked by companies in certain territories, does not mean all companies in that territory will ask those, nor does it mean no companies outside the territories stated won't ask them.
  2. The number of companies I have interviewed with is considerably small. This study guide covers very little ground of what can actually be asked.
  3. Every failed interview gets you closer to better offers. So don't give up, keep going, you are bound to make it.

Database

_Observation: It seems like Chinese and Hong Kong companies tend to ask questions related to the underlying data structures used b

# Travelling Salesman Problem Cyberjaya
#
# Usage:
# python tspcyber.py [<destination> ...]
#
# If no destination is passed in, it's assumed that rider
# will travel to all destinations.
#
# destination can be:
# dpulze, mmu, cyberia, mutiaraville, mdec, ntt,