Skip to content

Instantly share code, notes, and snippets.

View kiwavi's full-sized avatar

Munyiri Karobia kiwavi

  • Nairobi
View GitHub Profile
@0snap
0snap / post-install-arch-linux-setup.md
Last active January 14, 2024 22:40
Post-Installation Cheat Sheet for Arch Linux

Post-Installation Cheat Sheet for Arch Linux

This guide uses yay as the preferred AUR helper of choice.

Troubleshoot initial 'I have no Internet problems'

In case you did a fresh install and are now missing packages, yet cannot connect to the internet, simply boot via live-iso and arch-chroot into your system.

$ cryptsetup luksOpen /dev/nvme0n1p2 cryptroot      # only relevant in case of encrypted partition

$ mount /dev/mapper/cryptroot /mnt

@jiafulow
jiafulow / unix.md
Created June 18, 2019 16:05
Basics of the Unix Philosophy from 'The Art of Unix Programming" by Eric Steven Raymond

Basics of the Unix Philosophy

source: https://homepage.cs.uri.edu/~thenry/resources/unix_art/ch01s06.html

  1. Rule of Modularity: Write simple parts connected by clean interfaces.
  2. Rule of Clarity: Clarity is better than cleverness.
  3. Rule of Composition: Design programs to be connected to other programs.
  4. Rule of Separation: Separate policy from mechanism; separate interfaces from engines.
  5. Rule of Simplicity: Design for simplicity; add complexity only where you must.
  6. Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do.
@CodyReichert
CodyReichert / react-es6-flow-emacs-configuration.md
Last active February 22, 2025 10:42
Configuring Emacs for react, es6, and flow

Configuring Emacs for react, es6, and flow

For a while, JSX and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.

This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.

Set up web-mode

web-mode provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.

@ainsofs
ainsofs / gist:2b80771a5582b7528d9e
Created April 16, 2015 01:50
Clear .gitignore cache
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
@Kartones
Kartones / postgres-cheatsheet.md
Last active April 12, 2025 06:44
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)