Skip to content

Instantly share code, notes, and snippets.

qunwang6

Block or report user

Report or block qunwang6

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
View webclip.py
import uuid, BaseHTTPServer, select, types, webbrowser, editor, os, urllib
from SimpleHTTPServer import SimpleHTTPRequestHandler
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
global mobile_config_str
mobile_config_str = ''
View cross-match-sticks.py
def test(state):
' test if the state is final '
return all(d == 0 or d == 2 for d in state)
def next(state, cross=2):
' generate all possible moves from the current state '
for i, d in enumerate(state):
if d == 1:
l = left(state, i, cross)
View index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, user-scalabel=no">
<meta name="viewport" content="width=320, user-scalable=no" />
<style>
body{
background: #1f2631;
}
@qunwang6
qunwang6 / Matrix.lua
Created Apr 7, 2018 — forked from RamiLego4Game/Matrix.lua
Raspberry Pi Lua GPIO LED Matrix
View Matrix.lua
--LED Matrix RAMI
local json = dofile("/home/pi/Desktop/Matrix/json.lua")
local socket = require("socket")
local periphery = require('periphery')
local GPIO = periphery.GPIO
print("Using GPIO:",GPIO.version)
View pythonista bluetooth
from __future__ import print_function
import sys, cb, time, console
console.set_color(0, 0, 1)
print("""
_____ _ _____ _
| |___ _| |___| __ | |_ _ ___
| --| . | . | -_| __ -| | | | -_|
|_____|___|___|___|_____|_|___|___|
View unwxapkg.py
#!/usr/bin/env python2
# lrdcq
# usage python2 unwxapkg.py filename
import sys, os
import struct
class WxapkgFile(object):
nameLen = 0
View unwxapkg.py
#!/usr/bin/python
# usage python unwxapkg.py filename
import sys,os
import struct
class WxapkgFile:
nameLen = 0
name = ""
View wx_t1t_hack.js
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
View getTextFromGistRawUrl.py
import requests
import clipboard
import console
'''
Get Raw Text From URL
A wrench script to copy the text of a url to the clipboard.
I did this so I can get the text of a gist quickly.
To use, when you are viewing the gist in a web browser, click the
raw button on the page.
@qunwang6
qunwang6 / httpserver_qr.py
Created Dec 7, 2017 — forked from sydney0zq/httpserver_qr.py
simplehttpserver_with_qr_terminal
View httpserver_qr.py
#!/usr/bin/env python3
import os
import html
import urllib
import sys
import http
import cgi
import socket
import socketserver
You can’t perform that action at this time.