Skip to content

Instantly share code, notes, and snippets.


Maz Jaleel Mazyod

View GitHub Profile
Mazyod /
Last active Apr 13, 2019
Directory/files watchdog in Python
import os
import logging
from queue import Queue, Empty as EmptyQueue
from time import sleep
from threading import Thread
from typing import List
logger = logging.getLogger("watchdog")
mrw34 /
Last active Jan 21, 2021
Enabling SSL for PostgreSQL in Docker
set -euo pipefail
openssl req -new -text -passout pass:abcd -subj /CN=localhost -out server.req -keyout privkey.pem
openssl rsa -in privkey.pem -passin pass:abcd -out server.key
openssl req -x509 -in server.req -text -key server.key -out server.crt
chmod 600 server.key
test $(uname -s) == Linux && chown 70 server.key
docker run -d --name postgres -e POSTGRES_HOST_AUTH_METHOD=trust -v "$(pwd)/server.crt:/var/lib/postgresql/server.crt:ro" -v "$(pwd)/server.key:/var/lib/postgresql/server.key:ro" postgres:12-alpine -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
maciekish /
Created Aug 10, 2016
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/*
open /Applications/
heiswayi / Bindable.cs
Created Jun 5, 2016 — forked from btshft/Bindable.cs
Bindable class to reduce boilerplate code in mvvm (implement INotifyPropertyChanged)
View Bindable.cs
namespace Helpers
/// Reduce mvvm boilerplate
/// Usage:
/// public class MyViewModel : Bindable {
/// // Now this property supports INotifyPropertyChanged
/// public string MyProperty
/// {
mteece /
Last active Apr 15, 2020
List of NSTimeZone Abbreviations and Names (iOS 9.3.1)

NSTimeZone - Timezone Abbreviations ADT = "America/Halifax"; AKDT = "America/Juneau"; AKST = "America/Juneau"; ART = "America/Argentina/Buenos_Aires"; AST = "America/Halifax"; BDT = "Asia/Dhaka"; BRST = "America/Sao_Paulo"; BRT = "America/Sao_Paulo"; BST = "Europe/London";


#Phoenix 1.1.x to 1.2.0 Upgrade Instructions

Project Generator

To generate new projects as 1.2.0, install the new mix archive:

mix archive.install


Humoud /
Created Mar 21, 2016
Some notes I gathered on Prolog. Consider this a mini intro to Prolog. Will improve this gist as I continue to learn Prolog.
To run this:
open command prompt execute 'swipl'
then run ['path/to/this/'].
then query away.
likes(jana, omar).
likes(omar, jana).
Mazyod / Dockerfile
Last active Jan 5, 2016
Poco C++ Backend Starter Dockerfile
View Dockerfile
FROM ubuntu
MAINTAINER Maz Jaleel <>
# Install necessary tools to build Poco
RUN apt-get update && apt-get install -yq \
unzip wget build-essential cmake \
openssl libssl-dev \
unixODBC unixODBC-dev odbc-postgresql
radex /
Last active Jan 30, 2016
Trouble reproducing a bug? Run this checklist.

Trouble reproducing a bug? Run this checklist to make sure you're reproducing user's environment as closely as possible:


  • iOS version?
  • iPad/iPhone?
  • CPU architecture?
  • Screen size? Orientation? Slide-over/Split View?

iOS settings

View dev.exs
config :my_app, :twitter_api,
client: Twitter.SandboxClient