Skip to content

Instantly share code, notes, and snippets.

View youngershen's full-sized avatar
🎯
Focusing

Younger Shen youngershen

🎯
Focusing
View GitHub Profile
@youngershen
youngershen / qvodFetch.py
Created April 19, 2012 06:21
your sister 's qvod link spider
import re
import urllib
import string
def parseUrl(baseUrl):
urlContent = []
f = urllib.urlopen(baseUrl)
buffer = ''
for line in f.read():
buffer += line
@youngershen
youngershen / gist:2421224
Created April 19, 2012 14:15
你妹的,晚上就敲了这几行,pygame还老假死,去你妹
import os
import pygame
from pygame.locals import *
import pygame.surfarray as surfarray
def init():
pygame.init()
screen = pygame.display.set_mode((500,500))
@youngershen
youngershen / qvodFetch.py
Created April 24, 2012 11:35
fetch the qvod link in the qvodzy.me site
from bs4 import BeautifulSoup
import urllib
import os
import re
qvod_link_reg = re.compile(ur'qvod://[0-9]{9}\|[A-Z0-9]{40}\|[\u4e00-\u9fa50-9]+\.')
main_url = 'http://www.qvodzy.me'
def matchURL(url):
res = urllib.urlopen(url)
@youngershen
youngershen / LolMatchLeader.lua
Created August 28, 2012 06:49
lol match leader
-- project : LolMatchLeader
-- author : younger.shen
-- filename : LolMatchLeader.lua
-- filepath : /C/Users/Administrator/Desktop/LolMatchLeader.lua
[[
该程序用来确定某一个lol队伍的leader.
请求格式:
/?gameid=xxx&server=xxx&teamid=xxx&player=xxx
返回格式:
@youngershen
youngershen / gist:3705289
Created September 12, 2012 08:39
一个songtaste下载帮助油猴脚本
// ==UserScript==
// @name SongTasteHelper
// @namespace com.youngershen.songtaste
// @description 安装该插件之后会自动在songtaste的音乐播放页面显示获取歌曲链接的按钮,然后点击之,再然后,你懂的....
// @include http://www.songtaste.com/song/*
// @version 1
// ==/UserScript==
var button_str = "<button onclick = 'window.getSongURL()'>获取链接</button>";
document.body.innerHTML = button_str + document.body.innerHTML;
(function(window, document){
if(window.jigs4w){
return window.jigs4w;
}else{
jigs4w = {};
window.jigs4w = jigs4w;
@youngershen
youngershen / index.html
Created October 3, 2014 15:16
jigs4w puzzle
<html>
<head>
<style>
.jigsaw{
position: relative;
border: 2px solid #7f9db9;
overflow: hidden;
}
.jigsaw div{
(function(window,document) {
if (!window.jigsaw) {
jigsaw = {};
window.jigsaw = jigsaw;
}
jigsaw.clip_buffer = [];
jigsaw.total_steps = 0;
jigsaw.total_clip = 0;
jigsaw.current_index = 0;
@youngershen
youngershen / ed.py
Created October 6, 2014 19:15
homeword1
#!/usr/bin/env python
#-*- coding: utf-8 -*-
# author : younger shen
# email : younger.x.shen@gmail.com
# implement all of the task except extra bonus 3
// author : youngershen
// email : younger.x.shen@gmail.com
//
var SUPERCLASS = function(){};
(function(SUPERCLASS){
SUPERCLASS = SUPERCLASS || {};
var CLASS = SUPERCLASS;