Skip to content

Instantly share code, notes, and snippets.

View mychaelgo's full-sized avatar
🦄
Build product that people want

Mychael Go mychaelgo

🦄
Build product that people want
View GitHub Profile
@mychaelgo
mychaelgo / index.js
Last active January 15, 2023 02:49
Tokopedia transaction
const data = require('./data.json');
const convertToReadable = (data) => {
const result = [];
data[0].data.uohOrders.orders.forEach((order) => {
const invoiceUrl = JSON.parse(order.metadata.queryParams).invoice_url || `https://tokopedia.com${order.metadata.detailURL.webURL}`;
const paymentDate = order.metadata.paymentDate;
const products = order.metadata.products.map((product) => {
const title = product.title;
const inline1 = product.inline1.label;
# Turbolift recipe to update helm template versions
#
# prerequisites:
# 1. https://github.com/Skyscanner/turbolift#installation
# 2. https://github.com/mikefarah/yq#install
#
# assumptions:
# 1. you have all buddy pipeline definitions under `/.buddy` directory of each repo and they all have `.yaml` or `.yml` extension
# 2. you define the helm chart version in an action of type `HELM` which has a list of `execute_commands`, and the version is passed in like `--version $version`. In other words, there's an action that looks like:
# - action: Render k8s manifest from Helm chart
@mychaelgo
mychaelgo / dbeaver.sh
Created November 25, 2021 05:37
DBeaver Password recovery
openssl aes-128-cbc -d -K babb4a9f774ab853c96c2d653dfe544a -iv 00000000000000000000000000000000 -in "${HOME}/Library/DBeaverData/workspace6/General/.dbeaver/credentials-config.json" | dd bs=1 skip=16 2>/dev/null
#OR
openssl aes-128-cbc -d -K babb4a9f774ab853c96c2d653dfe544a -iv 00000000000000000000000000000000 -in "credentials-config.json" | dd bs=1 skip=16 2>/dev/null
ssh-keygen -t rsa -b 2048 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@mychaelgo
mychaelgo / install.sh
Last active December 17, 2024 02:27
Fresh install apps on mac
# install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install --cask iterm2
brew install zsh
#oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# 1. Open terminal and paste.
# 2. Open iTerm2 that we already downloaded at the first section
# 3. Go to iTerm2 > Preferences > Profiles > Colors Tab