Skip to content

Instantly share code, notes, and snippets.

Instructions for a mac on how to play with pyenv and poetry

Why both? Pyenv to manage multiple python versions. You can make virtualenvs with pyenv of course, but using poetry will simplify that process

# Install pyenv.
brew install pyenv

# Add pyenv initializer to shell startup script.
echo -e '\nif command -v pyenv 1>/dev/null 2>&1; then
@tanhaa
tanhaa / git_repo_move.md
Created October 5, 2019 19:03
Moving from bitbucket to github

Moving from bitbucket to github

Note: This procedure can be used to move git repos among any providers, from public github to self-managed github, from bitbucket to github, from github to bitbucket, and so forth and so on.

Procedure for moving (as complete full mirrors)

git clone --bare <bitubucket repo url>

This will not give you a working tree, but ensure all branches, refs, tags are downloaded, this is a bare git repo)

cd repo
# Make a new repo on github and add it as a new remote	
git remote add github 
@tanhaa
tanhaa / git_repos_ssh_keys.md
Created October 5, 2019 19:02
Multiple Git repos with multiple deploy ssh keys
@tanhaa
tanhaa / get_bitbucket_repos.py
Created October 5, 2019 19:01
Python Script to get a list of repos from bitbucket/stash
import stashy
from datetime import datetime
# Fill in below ----
stash_url = ""
stash_user = ""
stash_password = ""
# ------------------
stash = stashy.connect(stash_url, stash_user, stash_password)
projects = stash.projects.list()
@tanhaa
tanhaa / keybase.md
Last active October 16, 2022 02:12

Keybase proof

I hereby claim:

  • I am tanhaa on github.
  • I am amit08 (https://keybase.io/amit08) on keybase.
  • I have a public key ASAenbubTPr5TMDIEc_VlV0GPMPizxJKsozEVp6G3WjGbAo

To claim this, I am signing this object:

@tanhaa
tanhaa / git-pushing-multiple.rst
Created March 11, 2018 17:18 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@tanhaa
tanhaa / npm-debug.log
Created February 1, 2017 18:01
Errors when installing npm with npm install npm -g
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/bin/npm', 'install', 'npm', '-g' ]
2 info using npm@3.10.8
3 info using node@v6.9.1
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData npm
8 silly fetchNamedPackageData npm
9 silly mapToRegistry name npm
------------------
System Information
------------------
Time of this report: 2/13/2015, 22:40:37
Machine name: MY-LAPTOP
Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.150113-1808)
Language: English (Regional Setting: English)
System Manufacturer: Acer
System Model: Aspire 4752
BIOS: AcerSystem v2.2