Skip to content

Instantly share code, notes, and snippets.

View jumanbar's full-sized avatar
😎

Juan Manuel Barreneche jumanbar

😎
View GitHub Profile
@jumanbar
jumanbar / git.migrate
Created April 29, 2026 16:00 — 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.
library(tidyverse)
# dcp <- read_delim("data/datos_chile_planilla.txt",
# "\t", escape_double = FALSE, trim_ws = TRUE)
dcp <- structure(list(
`Grupo Edad` = c("21-30 años", "31-40 años", "41-50 años", "51-60",
"61-70 años", "71-80 años", "81 años +", "Total"),
`Población sin vacunar` = c(1120393, 804512, 537841, 248262, 209222, 70183,
81045, 3071458),
Incidencia = c(0.2, 0.6, 1.9, 4.4, 11.9, 44.2, 39.5, 3.8),
`Población vacunada` = c(2007876, 2247414, 2085048, 2115164, 1576802, 2900838,
Torres de Hanoi: importado
Torres de Hanoi con 8 piezas,
debe resolverse en 255 movimientos:
Movimientos: 0
t1: 8-7-6-5-4-3-2-1
t2:
t3:
==== Inicio ====
1: t1 ---> t2
Movimientos: 1