Skip to content

Instantly share code, notes, and snippets.

View rakhmad's full-sized avatar

Rakhmad Azhari rakhmad

View GitHub Profile
@rakhmad
rakhmad / kafka-server.properties
Created July 9, 2022 09:00 — forked from mansu/kafka-server.properties
Slack Kafka server config
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@rakhmad
rakhmad / postgres-cheatsheet.md
Created April 2, 2020 04:25 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

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)
# 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 September 30, 2018 09:11 — forked from rjorgenson/README.md
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
rakhmad / tutorial.md
Created July 21, 2018 16:05 — forked from swalkinshaw/tutorial.md
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.

@rakhmad
rakhmad / ↔️.js
Created February 17, 2018 00:03 — forked from zats/↔️.js
Bookmarklets for fullscreen, entering picture-in-picture, switching between fast and normal playback
javascript:document.getElementsByTagName('video')%5B0%5D.webkitEnterFullscreen()

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 June 10, 2017 15:51 — forked from jamtur01/ladder.md
Kickstarter Engineering Ladder
@rakhmad
rakhmad / joke.swift
Created June 8, 2017 05:10 — forked from airspeedswift/joke.swift
Multiline Literals
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)
------------------------------------------------------------------------------------------------------------------------
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, "