Skip to content

Instantly share code, notes, and snippets.

View zeapo's full-sized avatar
🦥
Thinking

Mohamed Zenadi zeapo

🦥
Thinking
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zeapo
zeapo / IW9F-0.py
Created May 29, 2017 19:17
null created by zeapo - https://repl.it/IW9F/0
def fn(arr):
target = [1, 3, 4]
j = 0
for el in arr:
if el == target[j]:
j += 1
else:
j = 0
;;;; 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)
;; -*- 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

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:

@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

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 / 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"
}