Skip to content

Instantly share code, notes, and snippets.

View zeapo's full-sized avatar
🦥
Thinking

Mohamed Zenadi zeapo

🦥
Thinking
View GitHub Profile
@zeapo
zeapo / expression_lister.js
Last active August 29, 2015 14:09
List watchers and expressions
getWatchers = function() {
var watchers, elementsWithScope, scope, i, len;
watchers = [];
elementsWithScope = document.querySelectorAll('.ng-scope');
for (i = 0, len = elementsWithScope.length; i < len; i++) {
scope = angular.element(elementsWithScope[i]).scope();
if (scope.$$watchers != null) {
watchers.push(scope.$$watchers);
}
}
@zeapo
zeapo / rec.sh
Created March 29, 2013 10:02 — forked from anonymous/rec.sh
#!/bin/sh
INFO=$(xwininfo -frame)
WIN_GEO=$(echo $INFO | grep -oEe 'geometry [0-9]+x[0-9]+' |\
grep -oEe '[0-9]+x[0-9]+')
WIN_XY=$(echo $INFO | grep -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' |\
grep -oEe '[0-9]+\+[0-9]+' | sed -e 's/+/,/' )
ffmpeg -f x11grab -y -r 15 -s $WIN_GEO -i :0.0+$WIN_XY -vcodec ffv1 -sameq -f alsa -ac 2\
@zeapo
zeapo / Makefile.inc
Created March 11, 2012 22:48
Makefile.inc for MUMPS 4.10 from http://blog.egrounds.org/?p=757
UTILSDIR = /opt
SCOTCHDIR = $(UTILSDIR)/scotch_5.1.11_esmumps
ISCOTCH = -I$(SCOTCHDIR)/include
LSCOTCH = -L$(SCOTCHDIR)/lib -lesmumps -lscotch -lscotcherr
METISDIR = $(UTILSDIR)/ParMetis-3.1.1
IMETIS = -I$(METISDIR)/
LMETIS = -L$(METISDIR)/ -lparmetis -lmetis