Skip to content

Instantly share code, notes, and snippets.

@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active May 13, 2024 07:56
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.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@h0tcatSub
h0tcatSub / baccarat.py
Created May 13, 2024 07:55 — forked from FSXAC/baccarat.py
A simplified Baccarat game implemented in Python
# This is a python file to show how the game works
import random
CARDS = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']
VALUE = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0]
OUTCOME = ['Player wins', 'Banker wins', 'Tie']
# Inclusive range function
irange = lambda start, end: range(start, end + 1)
@ttycelery
ttycelery / jingle-family-mart.txt
Last active May 13, 2024 07:55
Lirik Jingle Family Mart Lengkap 100%
// Transcribed manually from
// https://www.youtube.com/watch?v=GpUhmUVvD9Y
// Enjoy ;)
Hai kawan-kawan
Mari bekerja membangun bersama FamilyMart
Suka dan duka ada di FamilyMart
Semua keluarga kita
Mari menyapa pelanggan kita
@0ut0fcontrol
0ut0fcontrol / read_gz_file.py
Last active May 13, 2024 07:54
python read gzip(.gz) file line by line, compatible with python2 python3
import gzip
gzfile = "example.gz"
# using `with`
with gzip.open(gzfile) as f:
for i in f:
i = i.decode('utf-8') # for compatible with python3
#do sometime
print(i)
@ThioJoe
ThioJoe / cheat.bat
Last active May 13, 2024 07:53
"Cheat" Command Wrapper Script - Makes it easier to search specific terms with 'cheat' tool. Recommended to rename to "c.bat" for easy calling.
:: -----------------------------------------------------------------------------------------
:: Cheat Command Wrapper Script
:: -----------------------------------------------------------------------------------------
:: This batch script acts as a wrapper for 'cheat.exe', enhancing its functionality
:: by allowing more intuitive command-line interactions. Specifically, it:
::
:: 1. Directly accesses cheatsheets or tags with a single argument.
:: 2. Facilitates search within a cheatsheet using multiple arguments, treating them
:: as a single search query.
:: 3. Dynamically resolves the paths to the community and personal cheatsheets
@ThioJoe
ThioJoe / Error-Lookup-Tool-Friendly.bat
Last active May 13, 2024 07:53
Error Lookup Tool Friendly Output
@echo off
:: Note: Lines beginning with "REM" or :: are comments
:: Script by: https://github.com/thiojoe
:: Purpose: Creates a much more user friendly output for the Microsoft Error Lookup Tool (err.exe). It parses the original output and modifies the text.
:: Usage: Just call the batch file with command prompt along with the error code the same as you would with err.exe
:: Example: error.bat 50
:: Recommended to rename this script to something shorter like 'error.bat'. Must be next to the lookup tool exe file.
@v1mkss
v1mkss / JetBrains Activation.md
Last active May 13, 2024 07:53
JetBrains Activation

JetBrains Activation

  • No proxy for:
*.apache.org, *.github.com, *.github.io, *.githubusercontent.com, *.gitlab.com, *.google.com, *.gradle.org, *.jetbrains.space, *.maven.org, cache-redirector.jetbrains.com, cloudconfig.jetbrains.com, download-cdn.jetbrains.com, download.jetbrains.com, downloads.marketplace.jetbrains.com, ea-report.jetbrains.com, github.com, gitlab.com, google.com, gradle.org, jcenter.bintray.com, plugins.jetbrains.com, resources.jetbrains.com, www.jetbrains.com

Activation Key:

UX394X3HLT-eyJsaWNlbnNlSWQiOiJVWDM5NFgzSExUIiwibGljZW5zZWVOYW1lIjoiSG9uZ2lrIFVuaXZlcnNpdHntmY3snbXrjIDtlZnqtZAiLCJsaWNlbnNlZVR5cGUiOiJDTEFTU1JPT00iLCJhc3NpZ25lZU5hbWUiOiLkvJfliJvkupEg5bel5L2c5a6kIiwiYXNzaWduZWVFbWFpbCI6ImhhbmF6YXdhbWl0b0BnbWFpbC5jb20iLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDI0LTEyLTEzIiwiZXh0ZW5kZ
@juampynr
juampynr / CHANGELOG.md
Created March 27, 2018 09:35
Sample CHANGELOG

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as

@jaburns
jaburns / _hello.asm
Created November 3, 2019 20:43
Win32 assembly hello messagebox
global _mainCRTStartup
extern _ExitProcess@4
extern _MessageBoxA@16 ; Value after @ is size of args on stack
section .text
_mainCRTStartup:
; Setup stack to give us 4 bytes to play with
; push ebp
; sub esp, 4