Skip to content

Instantly share code, notes, and snippets.

View skaptox's full-sized avatar
🏠
Working from home

Skaptox skaptox

🏠
Working from home
View GitHub Profile
@bthaman
bthaman / list_environment_variables.py
Last active January 31, 2024 17:32
Python script to list all environment variables, and split the 'path' variable
""" lists environment variables, and splits elements in path variable """
import os
for k, v in sorted(os.environ.items()):
print(k+':', v)
print('\n')
# list elements in path environment variable
[print(item) for item in os.environ['PATH'].split(';')]
@Lwdthe1
Lwdthe1 / usaCities.js
Last active April 13, 2024 14:18
JSON of 5,950+ USA Cities and Their States - Presented by https://www.ManyStories.com
[
{'city': 'Abbeville', 'state': 'Louisiana'},
{'city': 'Aberdeen', 'state': 'Maryland'},
{'city': 'Aberdeen', 'state': 'Mississippi'},
{'city': 'Aberdeen', 'state': 'South Dakota'},
{'city': 'Aberdeen', 'state': 'Washington'},
{'city': 'Abilene', 'state': 'Texas'},
{'city': 'Abilene', 'state': 'Kansas'},
@0xjac
0xjac / private_fork.md
Last active April 26, 2024 14:38
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active April 27, 2024 06:31
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.