Skip to content

Instantly share code, notes, and snippets.

View songouyang's full-sized avatar
🎯
Focusing

songouyang

🎯
Focusing
View GitHub Profile

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@songouyang
songouyang / input_source.json
Created August 26, 2022 05:24
karabiner elements 自定义切换输入法规则
{
"title": "自定义切换输入法规则",
"rules": [
{
"description": "HHKB left_control 切换中英文",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_control",
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>长沙市芙蓉区将建长沙第一高楼 ——凤凰网房产北京</title>
<meta name="keywords" content="芙蓉,长沙,芙蓉区,区将建长沙第一高楼,长沙芙蓉CBD" />
<meta name="description" content="200米高的恒隆广场、210米高的泰贞广场、300米高的长沙最高的商务之星,还有横跨在芙蓉路上的空中平台长沙之门……翻开规划图,长沙芙蓉区CBD远景跃然纸上。昨日下午,30余位城市规划专家和各方代表畅所欲言,对《长沙芙蓉CBD产业发展规划(2011-2020)》(以下简称“长沙芙蓉CBD规划”)进行最终评审并一致同意通过该规划。" />
<meta property="og:type" content="article"/>
@songouyang
songouyang / acfun记录.md
Created July 25, 2019 06:30 — forked from esterTion/acfun记录.md
有关视频接口

AHP正在用的flash接口

'http://player.acfun.cn/flash_data?vid=' + pageInfo.sourceId + '&ct=85&ev=3&sign=' + pageInfo.sign + '&time=' + Date.now()
ct=85 ev=3
验referrer
rc4密钥 8bdc7e1a

(怀疑这是猴山人的beta,你看看那个 http://aplay-vod.cn-beijing.aliyuncs.com/acfun/h5.js
http://player.acfun.cn/js_data?vid=5bcac14b0cf2c691dfceccc9&ct=86&ev=4&sign=2_1540645549_5e1c0ab48b9dbd1861463324023a9db8
ct=86 ev=4

@songouyang
songouyang / SimpleHTTPServerWithUpload.py
Created July 21, 2019 08:06
SimpleHTTPServerWithUpload.py
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@songouyang
songouyang / 1545896926.svg
Last active June 22, 2019 08:14
Bloom Filter
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@songouyang
songouyang / ServiceGenerator.java
Created June 17, 2019 12:20
ServiceGenerator.java
package com.wifi.reader.network.service;
public class ServiceGenerator {
private static final java.math.BigDecimal BD32 = new java.math.BigDecimal(32);
private static final okhttp3.Cache CACHE = new okhttp3.Cache(com.wifi.reader.application.WKRApplication.c().getCacheDir(), 10485760);
public static final okhttp3.OkHttpClient HTTP_CLIENT = new okhttp3.OkHttpClient.Builder().connectTimeout(5, java.util.concurrent.TimeUnit.SECONDS).readTimeout(60, java.util.concurrent.TimeUnit.SECONDS).addInterceptor(REQUEST_INTERCEPTOR).addNetworkInterceptor(RESPONSE_INTERCEPTOR).sslSocketFactory(com.wifi.reader.glide.https.SSLSocketClient.getSSLSocketFactory()).hostnameVerifier(com.wifi.reader.glide.https.SSLSocketClient.getHostnameVerifier()).cache(CACHE).retryOnConnectionFailure(true).build();
private static final okhttp3.logging.HttpLoggingInterceptor LOGGING = new okhttp3.logging.HttpLoggingInterceptor().setLevel(okhttp3.logging.HttpLoggingInterceptor.Level.HEADERS);
private static final okhttp3.Interc
@songouyang
songouyang / downloader.py
Created May 18, 2019 10:27
多线程下载器
import re
from os import path
import requests
from threading import Lock
from six.moves.urllib.parse import unquote, urlparse
from concurrent.futures import ThreadPoolExecutor, wait
class Downloader(object):
def __init__(self, workers_num=8):
@songouyang
songouyang / .yarnrc
Created January 4, 2019 04:32
yarn 使用淘宝国内镜像
sass_binary_site "https://npm.taobao.org/mirrors/node-sass/"
phantomjs_cdnurl "https://npm.taobao.org/mirrors/phantomjs/"
electron_mirror "https://npm.taobao.org/mirrors/electron/"
registry "https://registry.npm.taobao.org"