Skip to content

Instantly share code, notes, and snippets.

View rizalgowandy's full-sized avatar
🎧
Focusing

Rizal Widyarta Gowandy rizalgowandy

🎧
Focusing
View GitHub Profile
@rizalgowandy
rizalgowandy / result.txt
Last active April 24, 2021 11:33
Fastest Redis Client Library for Go
┌───────────────────────────────────────────┬───────────┬─────────┬───────┬───────────┐
│ GET │ iteration │ ns/op │ B/op │ allocs/op │
├───────────────────────────────────────────┼───────────┼─────────┼───────┼───────────┤
│ gomodule/redigo-pool:100 │ 3750 │ 2581283 │ 11564 │ 65 │
│ go-redis/redis/v8-pool:100 │ 15184 │ 83180 │ 389 │ 9 │
│ mediocregopher/radix/v3-pool:100 │ 13754 │ 91094 │ 618 │ 16 │
│ joomcode/redispipe-pool:100 │ 1687 │ 1381936 │ 808 │ 30 │
│ go-redis/redis/v8/cluster-pool:100 │ 80394 │ 89093 │ 229 │ 8 │
│ mediocregopher/radix/v3/cluster-pool:100 │ 73596 │ 99571 │ 311 │ 9 │
@rizalgowandy
rizalgowandy / gist:064c977223a0072a1eb54c97ebf9cee7
Created July 18, 2020 13:23 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
package main
import (
"net/http"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
_ "github.com/rizalgowandy/go-swag-sample/docs/echosimple" ### replace line with your own path
echoSwagger "github.com/swaggo/echo-swagger"
)
@rizalgowandy
rizalgowandy / psql_get_table_schema.sql
Created May 3, 2020 10:15
PostgreSQL Get Table Schema
select nsp.nspname as object_schema,
cls.relname as object_name,
rol.rolname as owner,
case cls.relkind
when 'r' then 'TABLE'
when 'm' then 'MATERIALIZED_VIEW'
when 'i' then 'INDEX'
when 'S' then 'SEQUENCE'
when 'v' then 'VIEW'
when 'c' then 'TYPE'
redis-cli keys "*" > keys
cat keys | xargs -n 1 -L 1 redis-cli ttl > ttl
paste -d " " keys ttl | grep .*-1$ | cut -d " " -f 1 > without_ttl
# We can create a script for deleting the keys
cat without_ttl | awk '{print "redis-cli del "$1}' > redis.sh
@rizalgowandy
rizalgowandy / docker-help.md
Created December 28, 2019 13:51 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@rizalgowandy
rizalgowandy / eslint_prettier_airbnb.md
Created December 28, 2019 13:50 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@rizalgowandy
rizalgowandy / tutorial.sh
Last active December 28, 2019 13:49 — forked from bradtraversy/myscript.sh
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
@rizalgowandy
rizalgowandy / ssh.md
Created December 15, 2019 08:40 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test