Skip to content

Instantly share code, notes, and snippets.

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

Flavius Stefan Nicu flaviussn

🏠
Working from home
View GitHub Profile
@flaviussn
flaviussn / vscode-debug-launch.json
Created January 15, 2020 12:20 — forked from josemarcosrf/vscode-debug-launch.json
VSCode debug configuration examples
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
@flaviussn
flaviussn / private_fork.md
Created January 13, 2020 16:21 — forked from josemarcosrf/private_fork.md
Create a private fork of a public repository

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

We assume the following:

  • Old or original repo is: git@github.com:<user>/<old-repo>.git
  • New mirror will be: git@github.com:<your_username>/mirror.git

For this, the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)
@flaviussn
flaviussn / language_to_iso_code.py
Last active November 14, 2019 14:12
From language name to ISO code
import pycountry
def get_code(language):
lang = pycountry.languages.get(name=language)
# print(lang)
if lang is None:
return language+ " doesn't exist"
try:
return lang.alpha_2
except: