Skip to content

Instantly share code, notes, and snippets.

Avatar

Rakhmad Azhari rakhmad

View GitHub Profile
@rakhmad
rakhmad / postgres-cheatsheet.md
Created Apr 2, 2020 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet
View postgres-cheatsheet.md

PSQL

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 installed.sh
# Nix (~/.nix-profile/bin)
asciinema-2.0.0
bash-4.4-p19
cloc-1.76
cmake-3.10.2
cmatrix-1.2a
cowsay-3.03+dfsg1-16
curl-7.59.0
dhall-1.11.1
diff-so-fancy-1.2.0
@rakhmad
rakhmad / README.md
Created Sep 30, 2018 — forked from rjorgenson/README.md
Bear Journal
View README.md

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
rakhmad / tutorial.md
Created Jul 21, 2018 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API
View tutorial.md

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.

View keybase.md

Keybase proof

I hereby claim:

  • I am rakhmad on github.
  • I am rakhmad (https://keybase.io/rakhmad) on keybase.
  • I have a public key ASAehmcqkNecvA2owvdS5oDE5lqI5-KDcg2kS8AxyyKxDgo

To claim this, I am signing this object:

@rakhmad
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
javascript:document.getElementsByTagName('video')%5B0%5D.webkitEnterFullscreen()
View Principles-of-Adult-Behavior.md

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
rakhmad / ladder.md
Created Jun 10, 2017 — forked from jamtur01/ladder.md
Kickstarter Engineering Ladder
@rakhmad
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).
"""
print(joke)
View New in iOS 11 Headers.txt
------------------------------------------------------------------------------------------------------------------------
Search for 11_0
------------------------------------------------------------------------------------------------------------------------
Accounts/ACAccountType.h:12: ACCOUNTS_EXTERN NSString * const ACAccountTypeIdentifierTwitter NS_DEPRECATED(NA, 10_13, 5_0, 11_0, "Use Twitter SDK instead");
Accounts/ACAccountType.h:13: ACCOUNTS_EXTERN NSString * const ACAccountTypeIdentifierFacebook NS_DEPRECATED(NA, 10_13, 6_0, 11_0, "Use Facebook SDK instead");
Accounts/ACAccountType.h:14: ACCOUNTS_EXTERN NSString * const ACAccountTypeIdentifierSinaWeibo NS_DEPRECATED(NA, 10_13, 6_0, 11_0, "Use Sina Weibo SDK instead");
Accounts/ACAccountType.h:15: ACCOUNTS_EXTERN NSString * const ACAccountTypeIdentifierTencentWeibo NS_DEPRECATED(NA, 10_13, 7_0, 11_0, "Use Tencent Weibo SDK instead");
Accounts/ACAccountType.h:19: ACCOUNTS_EXTERN NSString * const ACFacebookAppIdKey NS_DEPRECATED(NA, 10_13, 6_0, 11_0, "
You can’t perform that action at this time.