URL: http://www.v2ex.com/api/site/stats.json
获取社区统计信息。
# -*- coding: utf-8 -*- | |
from flask import Flask | |
from flask import Response | |
from flask import stream_with_context | |
import requests | |
app = Flask(__name__) |
URL: http://www.v2ex.com/api/site/stats.json
获取社区统计信息。
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
LWin & c::Send, ^c | |
LWin & v::Send, ^v | |
LWin & x::Send, ^x | |
LWin & a::Send, ^a | |
LWin & t::Send, ^t |
(function() { | |
function escapeQuote(str) { | |
return str.replace("\"", "\\\""); | |
} | |
function buildAria2Url(name, url) { | |
return `aria2c -c -s10 -k1M -x16 --enable-rpc=false ` + | |
`-o "${escapeQuote(name)}" ` + | |
`--header "${escapeQuote(window.navigator.userAgent)}" ` + | |
`--header "Referer: ${escapeQuote(window.location.toString())}" ` + |
// ==UserScript== | |
// @name Twitter auto darkmode | |
// @version 1 | |
// @grant none | |
// @match *://twitter.com/* | |
// ==/UserScript== | |
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => { | |
const isDarkMode = e.matches ? 1 : 0; | |
document.cookie = `night_mode=${isDarkMode};path=/;domain=.twitter.com;secure`; |
" VIM配置文件 | |
" 设置语言及编码 | |
source $VIMRUNTIME/delmenu.vim | |
source $VIMRUNTIME/menu.vim | |
set enc=utf-8 | |
" set fencs=utf-8,ucs-bom,gbk,gb18030,shift-jis,gb2312,cp936 | |
" 常规设置 | |
set nocompatible " 关闭vi兼容模式 |
::-webkit-scrollbar{ | |
height:16px; | |
overflow:visible; | |
width:16px; | |
} | |
::-webkit-scrollbar-button{ | |
height:0; | |
width:0; | |
} |
#Dropbox | |
174.36.30.71 api.dropbox.com | |
174.129.7.52 pi-content.dropbox.com | |
174.36.30.90 www.dropbox.com | |
75.101.129.115 dl.dropbox.com | |
75.101.159.151 dl-web.dropbox.com | |
174.36.30.70 linux.dropbox.com | |
128.242.240.29 twitter.com |
# -*- coding: utf-8 -*- | |
import json | |
import hmac | |
import hashlib | |
import subprocess | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
def sign_request(body): |
local last_alert = nil | |
function displaySong(player) | |
artist, name = player.getCurrentArtist(), player.getCurrentTrack() | |
if (last_alert ~= nil) then | |
hs.alert.closeSpecific(last_alert) | |
end | |
last_alert = hs.alert.show(artist .. " - " .. name) |