Skip to content

Instantly share code, notes, and snippets.

View thapakazi's full-sized avatar
💭
🐧 🗡️ 💻

Milan Thapa thapakazi

💭
🐧 🗡️ 💻
View GitHub Profile
@thapakazi
thapakazi / lshw.org
Last active October 9, 2025 04:45 — forked from gxaurab/gist:4879b080aa3818d2ee3149f5643ff411
description of lshw

grubb description: Notebook product: 81H6 (LENOVO_MT_81H6_BU_idea_FM_ideapad 130-14IKB) vendor: LENOVO version: Lenovo ideapad 130-14IKB serial: MP1H8VQU width: 64 bits capabilities: smbios-3.0.0 dmi-3.0.0 smp vsyscall32 configuration: administrator_password=enabled boot=normal chassis=notebook family=ideapad 130-14IKB frontpanel_password=disabled keyboard_password=disabled power-on_password=disabled sku=LENOVO_MT_81H6_BU_idea_FM_ideapad 130-14IKB uuid=69cd9ed3-4580-11e9-8bb6-9c5a44316938

@thapakazi
thapakazi / logs.markdown
Created August 19, 2025 04:22 — forked from brentvatne/logs.markdown
Logs for iOS / Android on your computer

Logs in iOS simulator

Option 1: Use GUI log

  1. In simulator, press ⌘ + / or go to Debug -> Open System Log.
  2. That's it.

Option 2: Open it in terminal

  1. Run instruments -s devices
@thapakazi
thapakazi / postgres-cheatsheet.md
Created December 24, 2021 06:18 — 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)
@thapakazi
thapakazi / main.tf
Created July 5, 2021 17:03 — forked from syntaqx/main.tf
Terraform Generate Self-Signed Certificate Files (Nginx+)
resource "tls_private_key" "ca" {
algorithm = "RSA"
}
resource "tls_self_signed_cert" "ca" {
key_algorithm = "RSA"
private_key_pem = "${tls_private_key.ca.private_key_pem}"
subject {
common_name = "${var.domain}"
@thapakazi
thapakazi / install-kubernetes-archlinux.md
Created June 12, 2019 09:34 — forked from StephenSorriaux/install-kubernetes-archlinux.md
Install Kubernetes on bare-metal ArchLinux host

Installing Kubernetes on ArchLinux

Packages

pacman -S curl docker ebtables ethtool wget unzip

Also cfssl is needed but available on AUR, using pacaur

pacaur -S cfssl
@thapakazi
thapakazi / _aws_golang_examples.md
Created April 21, 2019 07:44 — forked from eferro/_aws_golang_examples.md
golang aws: examples

AWS Golang SDK examples

@thapakazi
thapakazi / curl.md
Created August 14, 2018 09:16 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

(defun source (filename)
"Update environment variables from a shell source file."
(interactive "fSource file: ")
(message "Sourcing environment from `%s'..." filename)
(with-temp-buffer
(shell-command (format "diff -u <(true; export) <(source %s; export)" filename) '(4))
(let ((envvar-re "declare -x \\([^=]+\\)=\\(.*\\)$"))