Skip to content

Instantly share code, notes, and snippets.


Jinxu imfht

Block or report user

Report or block imfht

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
imfht / httpdns.go
Created Sep 4, 2018 — forked from fangdingjun/httpdns.go
use dnspod's httpdns service to query dns
View httpdns.go
package main
import (
imfht / gist:af5970a3799b6064964fd5294499ec06
Created Aug 19, 2018 — forked from evilpacket/gist:3628941
Top 1000 from Alexa Top 1million
View gist:af5970a3799b6064964fd5294499ec06
wget -q;unzip; awk -F ',' '{print $2}' top-1m.csv|head -1000 > top-1000.txt; rm top-1m.csv*
imfht /
Created Jun 30, 2018 — forked from xrstf/
Nutch 2.3 + ElasticSearch 1.4 + HBase 0.94 Setup


This guide sets up a non-clustered Nutch crawler, which stores its data via HBase. We will not learn how to setup Hadoop et al., but just the bare minimum to crawl and index websites on a single machine.


  • Nutch - the crawler (fetches and parses websites)
  • HBase - filesystem storage for Nutch (Hadoop component, basically)
# coding=utf-8
import re
SSURT_RE = r"""
(?P<scheme> [a-zA-Z] [a-zA-Z0-9+.-]* : )?
(?P<slashes> /* )
imfht / dnsmasq.conf
Created Aug 29, 2017 — forked from aa65535/dnsmasq.conf
dnsmasq config
View dnsmasq.conf
# 并发查询所有上游DNS服务器
# 本地DNS缓存最小有效期
# 本地DNS缓存数目
# 上游DNS服务器, 可设置多个
imfht / gist:341468d410155b5be35c66acbb103d7f
Created Jul 27, 2017 — forked from hest/gist:8798884
Fast SQLAlchemy counting (avoid query.count() subquery)
View gist:341468d410155b5be35c66acbb103d7f
def get_count(q):
count_q = q.statement.with_only_columns([func.count()]).order_by(None)
count = q.session.execute(count_q).scalar()
return count
q = session.query(TestModel).filter(...).order_by(...)
# Slow: SELECT COUNT(*) FROM (SELECT ... FROM TestModel WHERE ...) ...
print q.count()
imfht /
Created Jul 3, 2017 — forked from liberize/
#!/usr/bin/env python
# coding: utf-8
import os
import sys
from PIL import Image, ImageChops
templates = []
imfht / fofa_rule.sql
Created May 30, 2017 — forked from Tr3jer/fofa_rule.sql
View fofa_rule.sql
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50542
Source Host : localhost
Source Database : rule
Target Server Type : MySQL
You can’t perform that action at this time.