Skip to content

Instantly share code, notes, and snippets.

View larsberg's full-sized avatar
💭
Big up to my github brethren

Lars Berg larsberg

💭
Big up to my github brethren
View GitHub Profile
@larsberg
larsberg / git-overwrite-branch.sh
Created October 27, 2015 18:59 — forked from brev/git-overwrite-branch.sh
Git overwrite branch with another branch
# overwrite master with contents of seotweaks branch (seotweaks > master)
git checkout seotweaks # source name
git merge -s ours master # target name
git checkout master # target name
git merge seotweaks # source name
@larsberg
larsberg / getWingedEdges.js
Created March 23, 2016 17:51
returns an edge to face map for a THREE geometry. make sure the vertices are merged before hand
'use strict'
var getWingedEdges = function( g ){
var edgeMap = {};
// find the edges
function getEdgeKey( i0, i1 ){
return Math.min(i0, i1) + '_' + Math.max(i0, i1);
}