Skip to content

Instantly share code, notes, and snippets.

View muammar's full-sized avatar
👋

Muammar El Khatib muammar

👋
View GitHub Profile
#!/bin/sh
# jekyll Starts and stops Jekyll
#
#
# chkconfig: - 85 15
# description: Jekyll is a Ruby based website caching engine
# processname: jekyll
# pidfile: /var/run/jekyll.pid
# Configure your values here
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
#

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
#pacman -S vicious
vicious = require("vicious")
-- {{{ Wibox
-- battery widget
batwidget = wibox.widget.textbox()
vicious.register(batwidget, vicious.widgets.bat, ' bat: $1 $2%<span color="#cccccc"> | </span>', 61, 'BAT0')
@muammar
muammar / colors.py
Created May 4, 2016 22:47 — forked from jossef/colors.py
python coloring for linux, based on this answer http://stackoverflow.com/a/26445590/3191896
def color(text, **user_styles):
styles = {
# styles
'reset': '\033[0m',
'bold': '\033[01m',
'disabled': '\033[02m',
'underline': '\033[04m',
'reverse': '\033[07m',
@muammar
muammar / getFirafonts.sh
Created May 23, 2016 08:41
Download and install Fira fonts in Linux or Mac OS X
#!/bin/bash
## cf from http://programster.blogspot.com/2014/05/ubuntu-14-desktop-install-fira-sans-and.html
cd /tmp
# install unzip just in case the user doesn't already have it.
if [[ `uname` = Linux ]]; then
sudo apt-get install unzip -y
wget "http://www.carrois.com/downloads/fira_4_1/FiraFonts4106.zip"
@muammar
muammar / collatz.py
Last active July 4, 2016 22:40
Collatz conjecture
#!/usr/bin/env python
from __future__ import division
import matplotlib.pyplot as plt
print('Enter integer number')
number = int(input())
collatz_series = []
collatz_series.append(number)
for DIR in $(find ./ -type d); do
(
echo "<html>\n<body>\n<h1>Directory listing</h1>\n<hr/>\n<pre>"
ls -1pa "${DIR}" | grep -v "^\./$" | grep -v "^index\.html$" | awk '{ printf "<a href=\"%s\">%s</a>\n",$1,$1 }'
echo "</pre>\n</body>\n</html>"
) > "${DIR}/index.html"
done
@muammar
muammar / mtrack.conf
Created August 13, 2016 09:20 — forked from snarlysodboxer/mtrak.conf
A config for Macbook Pro trackpad in mtrak in Ubuntu. https://github.com/BlueDragonX/xf86-input-mtrack/
Section "InputClass"
MatchIsTouchpad "on"
Identifier "Touchpads"
Driver "mtrack"
# TrackpadDisable - Disables trackpad touch input. A value of 0 will enable the trackpad. A value of 1 will disable tapping and gestures but not movement. A value of 2 will disable all input. A value of 3 will also disable physical buttons. Integer. Default is 0.
# Sensitivity - Adjusts the sensitivity (movement speed) of the touchpad. This is a real number greater than or equal to zero. Default is 1. A value of 0 will disable pointer movement.
Option "Sensitivity" "0.65"
# FingerHigh - Defines the pressure at which a finger is detected as a touch. This is a percentage represented as an integer. Default is 5.
Option "FingerHigh" "12"
# FingerLow - Defines the pressure at which a finger is detected as a release. This is a percentage represented as an integer. Default is 5.