Skip to content

Instantly share code, notes, and snippets.

View realazizk's full-sized avatar

aziz realazizk

View GitHub Profile

Keybase proof

I hereby claim:

  • I am mohamed-aziz on github.
  • I am azizkn (https://keybase.io/azizkn) on keybase.
  • I have a public key ASBS0rrfeyZtBpfw74bJJzzja9jPYr54RSrl2MaqndMjdgo

To claim this, I am signing this object:

@realazizk
realazizk / .screenrc-main-example
Last active May 14, 2021 21:20 — forked from ChrisWills/.screenrc-main-example
A nice default screenrc
# GNU Screen - main configuration file
# All other .screenrc files will source this file to inherit settings.
# Author: Christian Wills - cwills.sys@gmail.com
# Allow bold colors - necessary for some reason
attrcolor b ".I"
# Tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
@realazizk
realazizk / hickory-css-selectors.clj
Created November 16, 2019 13:14 — forked from taylorwood/hickory-css-selectors.clj
CSS selectors for Hickory
(ns hickory-css-selectors
"Convert CSS selectors into Hickory selectors."
(:require [clojure.string :as cs]
[hickory.select :as s]
[instaparse.core :as p]
[instaparse.transform :as pt]))
(def css-selector-parser
"An incomplete and not very good parser for CSS selectors.
https://drafts.csswg.org/selectors-3/#selectors"
@realazizk
realazizk / gist:831f6072a80e373d69e0d25dbbe634a0
Created November 21, 2017 20:34
Change random wallpaper every 5 minutes
while true; do feh --bg-fill $(ls -d1 ~/walls/*|grep -v /$|grep -E ".png|.jpg|.jpeg|.bmp"|python -c "import sys, random; print(random.choice(sys.stdin.read().splitlines()))") && sleep 300; done &
@realazizk
realazizk / subs.sh
Created March 19, 2017 13:25
Pull my subs?
#!/bin/bash
docker run --rm --name subliminal -v subliminal_cache:/usr/src/cache -v "$(pwd)":/tvshows -it diaoulael/subliminal download -l en "/tvshows/$1"
# ugly bruteforce algorithm it seems that it's O(m * n^3) where m is some
# integer representing the number of moves.
from pprint import PrettyPrinter
import copy
n = int(raw_input())
matrix = []
for _ in range(n):
Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
# MatchDevicePath "/dev/input/event*"
Option "TapButton1" "1"
Option "ClickTime" "1"
(defconst rocky-music-file "/home/mohamed/rocky.mp3")
(defvar rocky-music-process nil)
(defun rocky-start-music ()
(interactive)
(unless rocky-music-process
(setq rocky-music-process (start-process-shell-command "rocky-music" "rocky-music" (concat "mplayer " rocky-music-file " -loop 0")))))
@realazizk
realazizk / guake.patch
Created June 6, 2016 22:34
My patch solves multiple monitor problem on Guake 0.4.4
--- guake_old 2016-06-06 17:47:33.841266053 -0400
+++ guake 2016-06-06 17:18:49.109200465 -0400
@@ -826,22 +826,21 @@
width = 100
halignment = self.client.get_int(KEY('/general/window_halignment'))
- # get the rectangle just from the first/default monitor in the
- # future we might create a field to select which monitor you
- # wanna use
- window_rect = screen.get_monitor_geometry(0)
@realazizk
realazizk / config.py
Created April 2, 2016 17:57
My qtile config (Still working on it)
# Copyright (c) 2010 Aldo Cortesi
# Copyright (c) 2010, 2014 dequis
# Copyright (c) 2012 Randall Ma
# Copyright (c) 2012-2014 Tycho Andersen
# Copyright (c) 2012 Craig Barnes
# Copyright (c) 2013 horsik
# Copyright (c) 2013 Tao Sauvage
# Copyright (c) 2016 Mohamed Aziz Knani
# Permission is hereby granted, free of charge, to any person obtaining a copy