Skip to content

Instantly share code, notes, and snippets.

View LinkSake's full-sized avatar
🌊
I sure hope I know what I'm doing

Luis Ángel Ortega LinkSake

🌊
I sure hope I know what I'm doing
View GitHub Profile
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active May 12, 2024 15:13
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@Kartones
Kartones / postgres-cheatsheet.md
Last active May 11, 2024 17:14
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)
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active May 8, 2024 21:42
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@huytd
huytd / wordle.md
Last active May 2, 2024 12:13
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active March 12, 2024 15:59 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@blazewicz
blazewicz / docker-compose-install.sh
Last active January 4, 2024 18:14
Install latest docker-compose on Debian, Ubuntu or Raspberry Pi OS (Raspbian)
#!/bin/bash
set -x
# This script with documentation is available at: https://gist.github.com/blazewicz/04e666ae1f25387c8b291d81b12c550c
## 1. install required dependencies with apt
apt update && apt install python3-venv python3-dev libffi-dev libssl-dev
## 2. create directory for docker-compose's virtualenv
mkdir -p /opt/local/docker-compose