Skip to content

Instantly share code, notes, and snippets.

View abdelhai's full-sized avatar
🇵🇸
✌️

mustafa abdelhai

🇵🇸
✌️
View GitHub Profile
@abdelhai
abdelhai / fb_ages.py
Created April 11, 2015 00:57
ages from facebook comments, probably my first python "program" ever
# first: pip install requests
# second: python fb_ages.py
import requests
import json
import re
from collections import Counter, OrderedDict
ages = []
@abdelhai
abdelhai / code.py
Created January 4, 2016 22:33
this is a test description
#! /usr/bin/env python
"""Conversions to/from quoted-printable transport encoding as per RFC 1521."""
# (Dec 1991 version).
__all__ = ["encode", "decode", "encodestring", "decodestring"]
ESCAPE = '='
MAXLINESIZE = 76
@abdelhai
abdelhai / hola.js
Created January 5, 2016 15:03
testing tings
console.log('hola')
@abdelhai
abdelhai / GIF-Screencast-OSX.md
Created January 6, 2016 00:04 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

# # A very simple Flask Hello World app for you to get started with...
# from flask import Flask
# app = Flask(__name__)
from flask import Flask, request
import json
import sys
from io import StringIO
# # A very simple Flask Hello World app for you to get started with...
# from flask import Flask
# app = Flask(__name__)
from flask import Flask, request
import json
import sys
from io import StringIO
@abdelhai
abdelhai / maildirtocouch.py
Created December 24, 2016 13:05 — forked from faried/maildirtocouch.py
Store messages in a Maildir into a couchdb database.
#!/usr/bin/env python
"""Store messages in a Maildir into a couchdb database."""
import couchdb
from mailbox import Maildir
from optparse import OptionParser
import os
from pprint import pprint
import sys
from uuid import uuid4
{"one": 2}
import os
from typing import Optional
from urllib.parse import urlencode
import httpx
from fastapi import Cookie, FastAPI
from fastapi.responses import HTMLResponse, RedirectResponse
# make sure to set these env vars