Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Jinxu imfht

🎯
Focusing
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
imfht / paste_server.html
Created Apr 25, 2018
the index page of p.fht.im
View paste_server.html
<html>
<title>Welcome to Jinxu's paste Server</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat:400" rel="stylesheet">
<body style="font-family: 'Montserrat', sans-serif;">
<div style="margin-left: 35%">
<h2>Usage</h2>
<p>cat file.txt | nc p.fht.im 9999
<p>
<p>or add a alias</p>
<p>echo 'alias pt="nc p.fht.im 9999"' >> .bashrc</p>
@imfht
imfht / 1.txt
Created Apr 3, 2018
keras lstm demo
View 1.txt
This file has been truncated, but you can view the full file.
《白玉老虎》查看《白玉老虎》书评和最新更新以及相关书籍推荐请到《白玉老虎》专题网址http://www.xiaoshuotxt.com/wuxia/1813/
TXT小说天堂 http://www.xiaoshuotxt.net,最有文艺气息的文学网站,提供经典的文学名著、武侠小说、言情小说、人文社科类书籍在线阅读,所有TXT电子书手机免费下载阅读,我们提供给您的小说不求最多,但求最经典最完整
第一部 黄道吉日 第一章 夺命更夫
 小说t-xt天堂   
三月二十七日,大吉。
@imfht
imfht / shoot_test.py
Last active Mar 17, 2018
selenium chrome headless add user_agent
View shoot_test.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import base64
import sys
import uuid
from io import BytesIO
from PIL import Image
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
View s2_all.py
#!/usr/bin/env python
# coding=utf-8
# code by Lucifer
# Date 2017/10/22
import re
import sys
import socket
import base64
import httplib
@imfht
imfht / finger.json
Created Jan 5, 2018
邮件系统指纹
View finger.json
{
"products": [
{
"name": "eYou",
"banner": {
"http_banner": "亿邮电子邮件系统,亿邮邮件整体解决方案"
}
},
{
"name": "anymacro",
View urljoin.py
>>> import urlparse
>>> url = 'http://stackoverflow.com/questions/1234567/blah-blah-blah-blah'
>>> urlparse.urljoin(url, '/')
'http://stackoverflow.com/'
# source: https://stackoverflow.com/a/32214840/8591480
View ssurt.py
#!/usr/bin/python3
# coding=utf-8
import re
SSURT_RE = r"""
\A
(?P<scheme> [a-zA-Z] [a-zA-Z0-9+.-]* : )?
(?P<authority>
(?P<slashes> /* )
View PunkShoot.py
from flask import Flask
from flask import request
app = Flask(__name__)
from flask import send_file
from selenium import webdriver
import hashlib
from selenium.webdriver.common.keys import Keys
import datetime
@imfht
imfht / dnsmasq.conf
Created Aug 29, 2017 — forked from aa65535/dnsmasq.conf
dnsmasq config
View dnsmasq.conf
# 并发查询所有上游DNS服务器
all-servers
# 本地DNS缓存最小有效期
min-cache-ttl=3600
# 本地DNS缓存数目
cache-size=65535
# 上游DNS服务器, 可设置多个
server=8.8.4.4
#server=8.8.8.8
server=114.114.114.114
@imfht
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()
You can’t perform that action at this time.