Skip to content

Instantly share code, notes, and snippets.

Roy Binux binux

View GitHub Profile
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<span id="pos"></span>
<canvas id="myCanvas" width="1024" height="728"></canvas>
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
</head>
<body>
<script id="jsbin-javascript">
const search = (location.search.match(/q=([^&]+)/) || [null, "1"])[1];
const iframe = document.createElement('iframe');
@binux
binux / bookmark.js
Last active Dec 21, 2017
generate css selector for data extraction
View bookmark.js
javascript:(function (){document.getElementsByTagName('head')[0].appendChild(document.createElement('script')).src='https://gistcdn.githack.com/binux/fb853cd4f4d699d178e66c699b58be68/raw/css_selector_helper.js';}());
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<form action="https://book.jetblue.com/B6/webqtrip.html" method=POST>
<button type=submit>submit</submit> <br />
@binux
binux / pyproxy.sh
Last active Oct 27, 2016
A script to run proxy in docker. `/bin/bash -c "$(wget -q -O - https://gist.github.com/binux/60c3d22070f18bf396a85c43c43fb2bd/pyproxy.sh)" bash --bind=0.0.0.0`
View pyproxy.sh
#!/bin/bash
python -c "$(wget -O - https://bootstrap.pypa.io/get-pip.py)"
python -m pip install pyproxy
python -c "from pyproxy import main;main();" $@
View core.decrypt.swf.py
#!/usr/bin/python
swf = open('core.swf').read()
KEY = 'dkrltl0%4*@jrky#@$'
def decrypt(p1, p2=1):
l3 = None
l5 = 0
l6 = 0
l7 = 0
View parse_dblp.py
#!/usr/bin/python
# filename: parse_dblp.py
# author: ivanchou
import codecs, os
import xml.etree.ElementTree as ET
paper_tag = ('article','inproceedings','proceedings','book',
'incollection','phdthesis','mastersthesis','www')
class AllEntities:
View websocket.py
import threading
import tornado
import tornado.httpserver
import tornado.websocket
wss = []
class WSHandler(tornado.websocket.WebSocketHandler):
def check_origin(self, origin):
@binux
binux / TODO.md
Created Dec 11, 2014
pyspider TODO
View TODO.md

v0.3.0

[x] as a package [x] run.py parameters [x] sortable projects list #12 [x] Postgresql Supported via SQLAlchemy (with the power of SQLAlchemy, pyspider also support Oracle, SQL Server, etc) [x] benchmarking [ ] pypi release version

v0.4.0

View get_pinyin.py
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<roy@binux.me>
# http://binux.me
# Created on 2014-12-04 00:56:49
def get_py(word):
word = word.encode('gbk')
You can’t perform that action at this time.