Skip to content

Instantly share code, notes, and snippets.

@chehab
chehab / dumy-page.html
Created July 28, 2013 16:39
nav-tree ( Bootstrap 3 + Font Awesome )
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title> nav-tree &mdash; Bootstrap3 + Font Awesome </title>
@chehab
chehab / dir-tree.py
Created August 23, 2013 09:42
Go through every file and subdirectory in a directory tree
import os
for dirname, dirnames, filenames in os.walk('.'):
# print path to all subdirectories first.
for subdirname in dirnames:
print os.path.join(dirname, subdirname)
# print path to all filenames.
for filename in filenames:
print os.path.join(dirname, filename)
@chehab
chehab / flask_deploy.sh
Created November 22, 2013 13:42
Deploying Flask App mod_wsgi/Py Webfaction From http://community.webfaction.com/questions/12718/installing-flask
#!/bin/bash
# First, fill in these variables with your Application Name and URL Path:
APPNAME="myflask"
URLPATH="/"
# Step 2
# deploy the app
cd $HOME
@chehab
chehab / private.xml
Last active October 10, 2015 18:40
Karabiner (keyremap4macbook): private.xml for PC Keyboard
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>A4TECH</vendorname>
<vendorid>0x09da</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>A4TECH_PC_KB</productname>
<?xml version="1.0"?>
<root>
<item>
<name>@Mechanical keyboards</name>
<item>
<name>Ctrl+Enter to Fn+Enter</name>
<identifier>private.crtl_enter_to_fn_enter</identifier>
<autogen>--KeyToKey-- KeyCode::RETURN, ModifierFlag::CONTROL_L, KeyCode::RETURN, ModifierFlag::FN</autogen>
<autogen>--KeyToKey-- KeyCode::RETURN, ModifierFlag::CONTROL_R, KeyCode::RETURN, ModifierFlag::FN</autogen>
</item>
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@-moz-document url-prefix('https://huboard.com') {
/*************************************************************
Colum reStyle
*************************************************************/
.main-content.sidebar-open > .sidebar { flex: 0 0 230px; }
.main-content > .sidebar {
transition: all 0.4s ease-out 0s;
@chehab
chehab / powerline-clear-ml.theme.bash
Created June 25, 2015 14:24
Powerline Clear ML - Bash-it Theme based on powerline-multiline
#!/usr/bin/env bash
THEME_PROMPT_SEPARATOR=" "
THEME_PROMPT_LEFT_SEPARATOR=" "
SHELL_SSH_CHAR=${SHELL_SSH_CHAR:=" "}
SHELL_THEME_PROMPT_COLOR=32
SHELL_THEME_PROMPT_COLOR_SUDO=202
VIRTUALENV_CHAR=${POWERLINE_VIRTUALENV_CHAR:="ⓔ "}
@chehab
chehab / Learn Python.ipynb
Created April 15, 2016 08:04
Based on LearnPython.org
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
  • 🎨 when improving the format/structure of the code
  • 🚀 when improving performance
  • ✏️ when writing docs
  • 💡 new idea
  • 🚧 work in progress
  • ➕ when adding feature
  • ➖ when removing feature
  • 🔈 when adding logging
  • 🔇 when reducing logging
  • 🐛 when fixing a bug