Skip to content

Instantly share code, notes, and snippets.

Jonathan Kosgei jonathan-kosgei

Block or report user

Report or block jonathan-kosgei

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
marckohlbrugge / unread_only.js
Created May 3, 2018
Hides all read chats so you only see unread chats. Save this as a bookmarklet with and run on
View unread_only.js
$(".im_dialog_wrap").each(function(index, el){$(el).parents("li.im_dialog_wrap").addClass("ng-hide");});
View notify.js
const mailgun = require('mailgun-js')({apiKey: api_key, domain: domain});
const twilio = new require('twilio')(accountSid, authToken);
export default function notify (to, msg, options) {
if (Array.isArray(to)) {
to.forEach((toSingle) => notify(toSingle, msg, options));
if (to.includes("@")) {
T1T4N /
Last active Jan 11, 2019
Python conditional decorator
class conditional_decorator(object):
def __init__(self, dec, condition):
self.decorator = dec
self.condition = condition
def __call__(self, func):
if not self.condition:
# Return the function unchanged, not decorated.
return func
return self.decorator(func)
lcherone / disposable-email-provider-domains
Last active Sep 20, 2018 — forked from michenriksen/disposable-email-provider-domains
List of disposable email provider domains
View disposable-email-provider-domains
jonathan-kosgei /
Last active Jul 15, 2017
Delete all images in order of dependency excluding selected base images for faster builds
function list_include_item { local list="$1"; local item="$2"; if [[ $list =~ (^|[[:space:]])"$item"($|[[:space:]]) ]] ; then result=0; else result=1; fi; return $result;};
bases="alpine:latest nginx:1.11.3-alpine"
# append latest tag to each image
for item in $(docker images --format "{{.Repository}}:{{.Tag}}@{{.ID}}")
export IFS=' '
IFS='@'; arr=($item); unset IFS;
rverton /
Created Jul 10, 2017
Make a screenshot with a headless google chrome in python
# Install chromedriver from
import os
from optparse import OptionParser
from selenium import webdriver
from import Options
CHROME_PATH = '/usr/bin/google-chrome'
pgolding /
Created Jun 5, 2017
scan all elements from a dynamodb table using Python (boto3)
from __future__ import print_function # Python 2/3 compatibility
import boto3
import json
import decimal
from boto3.dynamodb.conditions import Key, Attr
# Helper class to convert a DynamoDB item to JSON.
class DecimalEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, decimal.Decimal):
mattsornson / geckoboard_madkudu_points_based
Created Apr 4, 2017
Geckboard's Point Based Lead Score
View geckoboard_madkudu_points_based
WHEN employees >= 500 THEN 50
WHEN employees >= 100 THEN 40
WHEN employees >= 50 THEN 10
WHEN employees >= 25 THEN 5
WHEN employees >= 10 THEN 3
barrachri /
Created Nov 9, 2016
Proxy Server with aiohttp
import logging
import sys
from urllib.parse import urljoin
import asyncio
import aiohttp
from aiohttp import web
thaJeztah /
Created Aug 5, 2016 — forked from lelandbatey/
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!


This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"


You can’t perform that action at this time.