Skip to content

Instantly share code, notes, and snippets.

On vacation

timfeirg timfeirg

On vacation
Block or report user

Report or block timfeirg

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
timfeirg /
Created Sep 25, 2018
analyse unused class and functions (using ag)
set -e
export IFS='
for target in $(ag -o '((class|def)\s+(\w+))'); do
target_name=$(echo $target | ag -o '\w+$')
#!/bin/env bash
long_ago=`date +%Y-%m-%d --date='2 weeks ago'`
for image in $(docker images --format '{{.CreatedAt}}|{{.Repository}}:{{.Tag}}')
created=`echo ${image%|*} | grep -oP "^[^\s]+"`
if [ -z "$created" ] || [ -z "$tag" ]; then

Keybase proof

I hereby claim:

  • I am timfeirg on github.
  • I am timfeirg ( on keybase.
  • I have a public key ASC1DDtmQwwr6tlAaRIYRNTO9bJUpy156TwKlU69uhryVwo

To claim this, I am signing this object:

timfeirg /
Last active Mar 25, 2018
the world's only json encoder that handles buffer message (or grpc message, I don't know)
import json
from datetime import datetime
from decimal import Decimal
from flask import Response
from functools import wraps
from google.protobuf.internal import api_implementation
if api_implementation.Type() == 'cpp':
from google.protobuf.pyext.cpp_message import GeneratedProtocolMessageType
timfeirg /
Last active Dec 19, 2018
scrapy HBase cache storage
from datetime import datetime
import happybase
import pymysql
from impala.dbapi import connect as hive_connect
from impala.util import as_pandas
from pymysql.cursors import DictCursor
from retrying import retry
from thriftpy.transport import TTransportException
timfeirg /
Created Dec 8, 2015
simple wrapper for sendcloud
#!/usr/bin/env python
# -*- coding: utf-8 -*-
File: sendcloud
Author: timfeirg
Description: sendcloud python wrapper
timfeirg / scrapyd command line program
Created Oct 15, 2014
scrapyd command line program, start scrapyd crawler using a python program
View scrapyd command line program
scrapyd commandline interface, for my own project use
import argparse
import requests
import json
import os
You can’t perform that action at this time.