Skip to content

Instantly share code, notes, and snippets.

View azamara's full-sized avatar

William Kim azamara

View GitHub Profile
@azamara
azamara / postgres-cheatsheet.md
Created March 20, 2019 14:22 — 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)
@azamara
azamara / vim_cheatsheet.md
Created March 20, 2019 14:22 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@azamara
azamara / tmux-cheatsheet.markdown
Created March 20, 2019 14:22 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@azamara
azamara / docker.yml
Last active March 19, 2019 00:28
metricbeat modules
# Module: docker
# Docs: https://www.elastic.co/guide/en/beats/metricbeat/6.5/metricbeat-module-docker.html
- module: docker
#metricsets:
# - container
# - cpu
# - diskio
# - healthcheck
# - info
---
- name: mounted in read-only
hosts: all
gather_facts: no
become: yes
tasks:
- name: Update kubelet
shell: |
---
- name: Install NFS Client
hosts: nfs-client
gather_facts: no
become: yes
tasks:
- name: Install
shell: |
yum install -y nfs-utils || (apt-get -y update && apt-get install -y nfs-common)
@azamara
azamara / index.html
Created July 18, 2018 14:04
proxy object polyfill test
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="app"></div>
<script>
@azamara
azamara / .bootstrap.sh
Created May 4, 2018 01:32
go project env configure
#!/bin/bash
# Color Code
# 30 Black
# 31 Red
# 32 Green
# 33 Yellow
# 34 Blue
# 35 Magenta
# 36 Cyan
@azamara
azamara / docker-compose.yml
Created April 24, 2018 14:30
Rancher AWX docker-compose
version: '2'
services:
memcached:
image: memcached:alpine
stdin_open: true
tty: true
labels:
io.rancher.container.pull_image: always
awx-web:
image: ansible/awx_web:latest
@azamara
azamara / download_egghead_videos.md
Last active December 20, 2017 16:41 — forked from ldong/download_egghead_videos.md
download egghead videos

Download videos from egghead

Go to the egghead website, i.e. Building a React.js App

run

var result = '';
$.each($('.relative .items-center > a'), function(index, video){
  result += video.href + '\n';