Skip to content

Instantly share code, notes, and snippets.

View gabel's full-sized avatar

Martin F gabel

  • SAP
  • Berlin
View GitHub Profile
# Updates all git repositories within a directory - Works on Mac (mention it here as other scripts did not)
# Assumption #1 - leading branch name is `master` - this changed to be `main` recently - check please in advance
# Assumption #2 - working with forks only using the git remote named `upstream`
# Assumption #3 - Having clean git repositories - no changed files
find . -maxdepth 2 -name '.git' -prune -type d -exec dirname {} \; | parallel --eta 'echo {} && git -C {} checkout master && git -C {} fetch upstream && git -C {} rebase -f upstream/master'
# Simplified version using no fork and origin only
# find . -maxdepth 2 -name '.git' -prune -type d -exec dirname {} \; | parallel --eta 'echo {} && git -C {} checkout master && git -C {} pull'
@gabel
gabel / tooltip-position-override.js
Created June 28, 2017 13:16 — forked from sjd78/tooltip-position-override.js
Override bootstrap 3.3.7 tooltip position code so it works with SVG elements
import jQuery from 'jquery/dist/jquery'
/*
* Override the bootstrap 3.3.7 Tooltip.getPosition() function to fix
* position issues with SVG elements when the page/viewport is scrolled.
*/
;(function ($) {
// const original = $.extend(true, {}, $.fn.tooltip.Constructor.prototype)
const extension = {
# Install ttfautohint on Ubuntu 12.04 LTS
# @author: Jean Lescure
# 2014/04/23
# Clone ttfautohint git repo to 'tmp' dir and cd into resulting repo folder
cd /tmp
git clone http://repo.or.cz/ttfautohint.git
cd ttfautohint
# Handle bootstrap's dependency: automake
// # Mocha Guide to Testing
// Objective is to explain describe(), it(), and before()/etc hooks
// 1. `describe()` is merely for grouping, which you can nest as deep
// 2. `it()` is a test case
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run
// before/after first/each it() or describe().
//
// Which means, `before()` is run before first it()/describe()
<!DOCTYPE html>
<meta charset="utf-8">
<title>Zoom + Pan</title>
<style>
.overlay {
fill: none;
pointer-events: all;
}
div{border:1px solid black; margin: 10px;}