Skip to content

Instantly share code, notes, and snippets.

View johanmcos's full-sized avatar

Johan M. Cos johanmcos

  • Comcast Corporation
  • Lehigh Valley, PA
View GitHub Profile
@mbostock
mbostock / intersections.js
Created July 12, 2012 01:25
Circle-Circle Intersection
function intersections(a, b) {
var R = a.r,
r = b.r,
dx = b.x - a.x,
dy = b.y - a.y,
d = Math.sqrt(dx * dx + dy * dy),
x = (d * d - r * r + R * R) / (2 * d),
y = Math.sqrt(R * R - x * x);
dx /= d;
dy /= d;
@mariozig
mariozig / migrate_repo.sh
Last active September 16, 2024 18:48
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror [email protected]:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.