Skip to content

Instantly share code, notes, and snippets.

View muammar's full-sized avatar
👋

Muammar El Khatib muammar

👋
View GitHub Profile
@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)
@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 / 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',
#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')

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

# 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).
#
#!/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