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 / file1.txt
Created December 18, 2014 19:15
Created via API
Demo
@zeapo
zeapo / unique_id.py
Created February 12, 2015 07:51
unique id test
import time
import random
import base64
import threading
from matplotlib import pyplot
from sets import Set
def run_job(nb_rand):
ids = Set()
nb_threads = 20
@zeapo
zeapo / gist:3164925017426102b17a
Created May 22, 2015 12:36
Open docs and pricing of a GCP product
function gdoc()
{
open "https://cloud.google.com/$1/docs"
}
function gpricing()
{
open "https://cloud.google.com/$1/pricing"
}

Keybase proof

I hereby claim:

  • I am zeapo on github.
  • I am mohamed (https://keybase.io/mohamed) on keybase.
  • I have a public key whose fingerprint is EA12 C0FB 5B3E 9881 5F03 C0E8 29E7 4417 C51F D42A

To claim this, I am signing this object:

@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
@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\

Keybase proof

I hereby claim:

  • I am zeapo on github.
  • I am mohamed (https://keybase.io/mohamed) on keybase.
  • I have a public key whose fingerprint is A202 B39A 96E5 ACF3 C60C EC46 9BAB CF6B 8528 9CA1

To claim this, I am signing this object:

;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;;;; global
;; text-width
(set-fill-column 120)
(define-key evil-normal-state-map ";" 'evil-ex)
(define-key evil-normal-state-map "v" 'evil-visual-block)
(define-key evil-normal-state-map (kbd "C-v") 'evil-visual-state)
(define-key evil-normal-state-map " " 'ace-jump-mode)