Skip to content

Instantly share code, notes, and snippets.

View xiaohanyu's full-sized avatar
🏠
Working from home

Xiao Hanyu xiaohanyu

🏠
Working from home
View GitHub Profile
// ==UserScript==
// @name Revert Reshare
// @namespace http://zr.is/
// @version 0.3.1
// @description Make Reshare Great Again!
// @author Zeyi Fan
// @match https://www.douban.com/*
// @grant GM_addStyle
// ==/UserScript==
@bylatt
bylatt / pyenv.sh
Last active November 10, 2020 16:29
Install python 2.7.10 with pyenv on centos 7
# install python 2.7.10 with pyenv on centos 7
yum install -y gcc gcc-c++ make git patch openssl-devel zlib-devel readline-devel sqlite-devel bzip2-devel
git clone git://github.com/yyuu/pyenv.git ~/.pyenv
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> .bashrc
echo 'eval "$(pyenv init -)"' >> .bashrc
pyenv install 2.7.10
pyenv global 2.7.10
<a class="question_link" target="_blank" href="/question/30746665/answer/49332475">会写 Parser、Tokenizer 是什么水平?</a><br/><br/>大多数编译原理书前100页的内容,说明大学听了一半左右的编译原理课,通俗地说,写了这个只能证明你不是个棒槌。<br><br><br>所以其实你更应该关心不会tokenizer和parser是什么水平。
<span class="answer-date-link-wrap">
<a class="answer-date-link last_updated meta-item" data-tip="s$t$发布于 2015-05-29" target="_blank" href="/question/30746665/answer/49332475">编辑于 2015-05-29</a>
</span>
<hr/><a class="question_link" target="_blank" href="/question/30703519/answer/49150834">王垠到底对 winter 做了什么?</a><br/><br/>你可以理解为是路边看到一坨**,忍不住想去一脚踩爆它的心态。(虽然我知道这么做无聊而且会沾一脚)<br><br>想了想,可能还有一点觉得他的粉丝很可怜的,想让他们停止吃**的心态吧,虽然我知道"然而没卵用"。<br><br>回到题主的问题,要问做了什么,那就是“他是**,还碰巧被我看到了”,这样的事情,简直无法被饶恕。
import requests
from db import db
"""
The Douban Group API which not display on http://developers.douban.com/wiki/?title=api_v2
Base url: https://api.douban.com/v2
Group info: /group/:id
@syohex
syohex / update_css_dictionary.rb
Created May 19, 2014 09:06
Script for updating auto-complete CSS dictionary
#!/usr/bin/env ruby
require 'open-uri'
require 'nokogiri'
require 'set'
old_url = 'https://raw.githubusercontent.com/auto-complete/auto-complete/master/dict/css-mode'
old_properties = SortedSet.new
open(old_url).read.each_line do |line|
@nicktoumpelis
nicktoumpelis / repo-rinse.sh
Created April 23, 2014 13:00
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@abo-abo
abo-abo / query.sql
Last active September 8, 2020 08:03
Use https://developers.google.com/bigquery/ to select top 100 repos by number of commits
select repository_name, count(repository_name) as pushes, repository_description, repository_url
from [githubarchive:github.timeline]
where type="PushEvent"
and repository_language="Emacs Lisp"
and parse_utc_usec(created_at) >= parse_utc_usec('2014-01-01 00:00:00')
group by repository_name, repository_description, repository_url
order by pushes desc
limit 100
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References
@willurd
willurd / web-servers.md
Last active May 6, 2024 13:43
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@jjgod
jjgod / my-setup.markdown
Last active May 14, 2020 15:06
My setup