Skip to content

Instantly share code, notes, and snippets.

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

Pascal Ulor PascalUlor

🏠
Working from home
View GitHub Profile
@PascalUlor
PascalUlor / smallest_string.md
Created December 17, 2019 18:13 — forked from seanchen1991/gist:d8c63f789dcfdf67e70552dd30fc24c8
Smallest String Problem Statement

Smallest String

Write a function that takes two strings and returns the "smallest" string. If both strings are equal, you may return either string. Strings will only consist of lowercase letters and numbers: [a - z][0 - 9]. Letters earlier in the alphabet are considered smaller. Consecutive digits in the string should be considered a single number.

Examples:
@PascalUlor
PascalUlor / git.migrate
Created August 6, 2018 00:06 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.