Skip to content

Instantly share code, notes, and snippets.

@xavierskip
xavierskip / captcha.py
Created June 1, 2016 07:51
a simple captcha hacker tool for example
#!/usr/bin/env python
# coding: utf-8
import requests
import StringIO
from PIL import Image
import os
import time
YES = 'X'
NO = '-'
@xavierskip
xavierskip / result.txt
Created June 1, 2016 07:22
result of compare
0:0 1.0
0:6 0.886904761905
0:9 0.875
0:8 0.85119047619
0:3 0.809523809524
0:4 0.767857142857
0:2 0.761904761905
0:5 0.75
0:7 0.672619047619
0:1 0.607142857143
@xavierskip
xavierskip / say.sh
Created November 15, 2015 07:37
mac say
say --voice="Agnes" Isn\'t it nice to have a computer that will talk to you?
say --voice="Albert" I have a frog in my throat. No, I mean a real frog!
say --voice="Alex" Most people recognize me by my voice.
say --voice="Alice" Salve, mi chiamo Alice e sono una voce italiana.
say --voice="Alva" Hej, jag heter Alva. Jag är en svensk röst.
say --voice="Amelie" Bonjour, je m ’ appelle Amelie. Je suis une voix canadienne.
say --voice="Anna" Hallo, ich heiße Anna und ich bin eine deutsche Stimme.
say --voice="Bad News" The light you see at the end of the tunnel is the headlamp of a fast approaching train.
say --voice="Bahh" Do not pull the wool over my eyes.
say --voice="Bells" Time flies when you are having fun.
@xavierskip
xavierskip / meta.html
Last active October 24, 2020 14:49
对于国内双核浏览器强制使用Webkit内核渲染页面
<meta name="renderer" content="webkit">
//360 6.X 以上可识别
<meta name="force-rendering" content="webkit">
//其他双核可识别
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
//对于没有自带 IE7 内核的浏览器 强制使用用户已安装的最高版本浏览器渲染, 有Chrome框架的优先使用
@xavierskip
xavierskip / doubanFM2NetEase.js
Last active August 29, 2015 14:27
doubanFM searching in netease cloud music
// ==UserScript==
// @name doubanFM2NetEase
// @namespace http://xavierskip.com/
// @version 0.1
// @description doubanFM searching in netease cloud music
// @author xavier skip
// @match http://douban.fm/*
// @grant none
// ==/UserScript==
function addGlobalStyle(css) {
@xavierskip
xavierskip / summary.py
Last active August 29, 2015 14:22
summary.py
#!/usr/bin/env python
#coding: utf-8
import sys
argvs = sys.argv
class syntaxError(Exception):
def __init__(self, line):
# start with 1
self.line = line+1
This is a Chinese version of https://gist.github.com/1207002/86f48cd3b3b72c85e6293926cf7c730de03b2f08 from "lucasfais":https://gist.github.com/lucasfais
h1. Sublime Text 2 - 实用快捷键 (Mac OS X)
h2. 打开/前往
| *⌘T* | 前往文件 |
| *⌘⌃P* | 前往项目 |
| *⌘R* | 前往 method |
| *⌘⇧P* | 命令提示 |
@xavierskip
xavierskip / snake.py
Last active February 24, 2023 12:21
snake in terminal
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
import time
import random
class Snake():
def __init__(self,length,screen):
# left top coordinate (y,x)
@xavierskip
xavierskip / weibo.js
Last active August 29, 2015 14:12
weibo statistics.
//document.body.appendChild(document.createElement('script')).src='http://code.jquery.com/jquery-1.9.1.min.js';
// get content
var wl=[];
// Manual page
var tl = document.getElementsByClassName("WB_text")
for(var i=0;i<tl.length;i++){
wl.push(tl[i].innerText);
};
var wb = wl.join('').replace(/http:\/\/t\.cn\/[a-zA-Z0-9]+/g,'');
// get time
@xavierskip
xavierskip / scan.py
Created June 3, 2014 16:45
scan the lan
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import os, re, threading
addrs = {}
def bin8(n):
byte = "{0:08b}".format(n)
if len(byte)<8:
byte = '0'*(8-len(byte))+byte