Skip to content

Instantly share code, notes, and snippets.


Rakhmad Azhari rakhmad

View GitHub Profile
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
rakhmad /
Created Apr 2, 2020 — forked from Kartones/
PostgreSQL command line cheatsheet


Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
View conf: CLI tools I
# Nix (~/.nix-profile/bin)
rakhmad /
Created Sep 30, 2018 — forked from rjorgenson/
Bear Journal

I created these scripts to generate some daily and monthly notes in Bear.

The launchd scripts will run the daily script every day at 3am and the monthly script on the first of every month at 2am. Make sure to update the path to the actual scripts in the launchd scripts before loading them.

mv com.bearjournal.daily.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.bearjournal.daily.plist

mv com.bearjournal.monthly.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.bearjournal.monthly.plist
rakhmad /
Created Jul 21, 2018 — forked from swalkinshaw/
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.


Keybase proof

I hereby claim:

  • I am rakhmad on github.
  • I am rakhmad ( on keybase.
  • I have a public key ASAehmcqkNecvA2owvdS5oDE5lqI5-KDcg2kS8AxyyKxDgo

To claim this, I am signing this object:

rakhmad / ↔️.js
Created Feb 17, 2018 — forked from zats/↔️.js
Bookmarklets for fullscreen, entering picture-in-picture, switching between fast and normal playback
View ↔️.js

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
rakhmad /
Created Jun 10, 2017 — forked from jamtur01/
Kickstarter Engineering Ladder
rakhmad / joke.swift
Created Jun 8, 2017 — forked from airspeedswift/joke.swift
Multiline Literals
View joke.swift
func tellJoke(name: String, character: Character) {
let punchline = name.filter { $0 != character }
let n = name.count - punchline.count
let joke = """
Q: Why does \(name) have \(n) \(character)'s in their name?
A: I don't know, why does \(name) have \(n) \(character)'s in their name?
Q: Because otherwise they'd be called \(punchline).