Skip to content

Instantly share code, notes, and snippets.

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

mustafa abdelhai

🇵🇸
✌️
View GitHub Profile
@abdelhai
abdelhai / report.md
Last active May 29, 2022 08:37
Thursday 26.05.2022 "deta.dev" domain incident

Thursday 26.05.2022 incident

Yesterday (26.05.2022), deta.dev, one of our domains responsible for providing the hostnames for our Micros service was unavailable between 18:30 - 20:15 CET/GMT+2.

Affected services

deta.dev was not available

The DNS resolution for our apex domain deta.dev was failing and thus all the *.deta.dev hostnames weren’t reachable. This means any content hosted on a Micro wasn’t available via its deta.dev URL.

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
{"one": 2}
@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
# # 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 / 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:

@abdelhai
abdelhai / hola.js
Created January 5, 2016 15:03
testing tings
console.log('hola')
@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