Skip to content

Instantly share code, notes, and snippets.

@thwang
thwang / work-with-multiple-github-accounts.md
Created October 23, 2024 04:20 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@thwang
thwang / image_tsne_projections.json
Last active July 2, 2021 00:01 — forked from duhaime/image_tsne_projections.json
Image TSNE Projections on canvas
[{"image": "ab67706f000000029c3c3e53d40f5495c5766515.jpg", "x": 5.737175, "y": -0.50583804}, {"image": "ab67706f00000002ca580600d72960e30e1795b1.jpg", "x": 8.300361, "y": -0.54659235}, {"image": "ab67706f0000000257a5ba0b3bc0f9b351147c32.jpg", "x": -11.289168, "y": -11.821602}, {"image": "ab67706f00000002ed3a8bb5b72ab5ccbf5834b8.jpg", "x": -0.9794795, "y": 7.3077946}, {"image": "ab67706f00000002ffa215be1a4c64e3cbf59d1e.jpg", "x": -11.500878, "y": -11.614689}, {"image": "ab67706f000000029fea17fbb4d0666d2dc57c53.jpg", "x": 12.434442, "y": -10.406983}, {"image": "ab67706f00000002b768c18f8cb1f261f00189e5.jpg", "x": -16.683502, "y": 12.67061}, {"image": "ab67706f00000002a46138eced5c3f01f14ee301.jpg", "x": -13.823483, "y": 16.380829}, {"image": "ab67706f000000022c1ecd36179ded42ec8bcfc5.jpg", "x": -6.753352, "y": -8.514856}, {"image": "ab67706f000000024cf08feff9d7606a31a69045.jpg", "x": -16.478844, "y": 11.680555}, {"image": "ab67706f00000002fa4491662e1fa5936464694f.jpg", "x": 5.057813, "y": 3.1238055}, {"image": "ab
@thwang
thwang / splitCsv.bash
Last active April 1, 2020 15:17
split a given file into X rows. include the original file header and file extension for all splits.
#! /usr/bin/env bash
# can copy the function or source the file and call
# e.g. source /PATH/TO/FUNCTION && splitCsv /PATH/TO/FILE CHUNKSIZE
# if CHUNKSIZE is not given default is 250,000 rows per split file
# sanity check file row counts with `wc -l ORIGINAL_FILENAME` vs `wc -l SPLIT_FILENAME_PREFIX*`
splitCsv() {
HEADER=$(head -1 "$1")
if [ -n "$2" ]; then