Skip to content

Instantly share code, notes, and snippets.

View aalhour's full-sized avatar
🪂

Ahmad Alhour aalhour

🪂
View GitHub Profile
@aalhour
aalhour / Dockerfile.bite_sized_networking
Created April 23, 2019 09:53 — forked from justanotherdot/Dockerfile.bite_sized_networking
A Dockerfile with (almost) all the tools mentioned in Bite Size Networking by Julia Evans
# N.B. The only tool missing here that is mentioned in the document is `zenmap`
# purely because this image is intended to be run via a CLI and `zenmap` is a GUI
# to `nmap` i.e. one can play around with the tools by running:
#
# $ docker build --name bite_size_networking:latest .
# $ docker run --rm -d --name bsn_test bite_size_networking:latest
# $ docker exec -it bsn_test bash
#
# Alternatively, one can change the `ENTRYPOINT` to `["bash"]` and run:
#
@aalhour
aalhour / README.md
Created March 29, 2019 12:00 — forked from jm3/README.md
Cognitive Bias Codex
@aalhour
aalhour / README.md
Last active March 9, 2018 09:19
BrainFuck Interpreter and REPL in Python 3

PBFI: Pythonic BrainFuck Interpreter

Yet another educational interpreter for the BrainFuck Programming Language, written in Python 3. This might not be the shortest BrainFuck interpreter that you had come acorss, however the style of programming is for educational purposes only.

USAGE:

Help:

@aalhour
aalhour / eca.py
Last active October 29, 2017 14:49 — forked from nst/eca.py
Elementary Cellular Automata PNG images generator. Based on Nicolas Seriot's gist (https://goo.gl/fh4d5Y).
#!/usr/bin/env python3
__author__ = "Ahmad Alhour"
__date__ = "2017-10-29"
__website__ = "https://gist.github.com/aalhour/533b8ea1a1d71bbfb026c16d956aa6d2"
"""
eca.py
Elementary Cellular Automata PNG images generator. Based on Nicolas Seriot's gist (https://goo.gl/fh4d5Y).
@aalhour
aalhour / SingletonPatternExample.cs
Last active August 17, 2017 21:35
A singleton class example in C#.
public sealed class SingletonExample
{
// internal singleton instance
private static SingletonExample _instance;
// lock for thread-safety laziness
private static readonly object _mutex = new object();
// private empty constuctor
private SingletonExample()
@aalhour
aalhour / ladder.md
Created June 16, 2017 21:06 — forked from jamtur01/ladder.md
Kickstarter Engineering Ladder
@aalhour
aalhour / async_psycopg2.py
Created February 24, 2017 08:25 — forked from FSX/async_psycopg2.py
A module for asynchronous PostgreSQL queries in Tornado.
#!/usr/bin/env python
__author__ = 'Frank Smit <frank@61924.nl>'
__version__ = '0.1.0'
import functools
import psycopg2
from tornado.ioloop import IOLoop, PeriodicCallback
@aalhour
aalhour / supervisord.sh
Created January 15, 2017 18:13 — forked from danmackinlay/supervisord.sh
an init.d script for supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@aalhour
aalhour / Django_Gunicorn_Nginx.makefile
Created December 13, 2016 15:46 — forked from efraintorlo/Django_Gunicorn_Nginx.makefile
Django with Gunicorn + Nginx
SHELL := /bin/bash
#-----------------------------------------------
# __ __ _ __ _ _
# | \/ | __ _| | _____ / _(_) | ___
# | |\/| |/ _ | |/ / _ \ |_| | |/ _ \
# | | | | (_| | < __/ _| | | __/
# |_| |_|\__,_|_|\_\___|_| |_|_|\___|
#
#-----------------------------------------------
# Makefile to use:
@aalhour
aalhour / gunicorn.conf.py
Created December 13, 2016 11:09
Configuration Files for Nginx + Gunicorn + Supervisord (See original: https://gist.github.com/dstufft/997475)
bind = "127.0.0.1:9006"
workers = 2
worker_class = 'gevent'
max_requests = 1000
timeout = 30
keep_alive = 2
preload = True