Skip to content

Instantly share code, notes, and snippets.

View wogong's full-sized avatar
🎯
Focusing

wogong wogong

🎯
Focusing
View GitHub Profile
@wzyboy
wzyboy / fetch-prices.py
Last active May 28, 2024 22:21
Fetch prices from IEX API for Beancount
#!/usr/bin/env python
'''A quick-and-dirty script to fetch prices from IEX API.'''
import sys
import argparse
import requests
from dateutil.parser import parse as parse_datetime
from beancount.core import data
# coding: utf-8
# 更新于2017/10/02,python3测试通过
import re
import requests
# 领取 X 铜币
# 每日登录奖励已领取
base_headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.57 Safari/537.36 OPR/40.0.2308.15 (Edition beta)', 'Referer': 'https://www.v2ex.com/signin', 'Origin': 'https://www.v2ex.com'}
@janlay
janlay / README.md
Last active March 20, 2025 13:05
Yet another config for Surge.app

Install

  1. Modify index.txt with your output path and proxy info
  2. Use Text Builder to build configuration for Surge: $ text-builder -index /path/to/index.txt Or run $ sh build-all to build all your index files.
  3. Import configuration via AirDrop/iTunes/Dropbox/iCloud

本人不提供任何保证和技术支持,使用者自负风险。
There are no guarantees, no any support. Use it at your own risk.

@amoshyc
amoshyc / OJBasicInput.cpp
Last active August 29, 2015 14:00
OJBasicInput.cpp
/*
這本來的某考上大學的非資訊社同學問我的,剛好有空就把它整理出來
以下是一些我臨時想到的,歡迎補充。
這些對論壇中大部人已經是基礎了吧~不過我想對下一屆學弟還是有用的。
我自己是習慣用 cin 和 string 來做 input,雖然有些題目真的需要用 scanf 速度上才過得了…
但 scanf 跟我不是很熟,怕誤導學弟,就等其它人來寫了。
以下都以例子來說明。
註:這些寫法不是唯一的,存在著許多不同寫法可以有同樣效果。
目錄:
@mhawksey
mhawksey / gist:7770536
Last active May 3, 2016 06:28
Google Apps Script code used in 'Keep your Twitter Archive fresh on Google Drive' http://mashe.hawksey.info/2013/01/sync-twitter-archive-with-google-drive/. To fix getContentAsString error open Tools > Script editor in your copy and replace the code with version below and test run the function updateArchive()
/*
Copyright 2013 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@teffalump
teffalump / README.md
Last active January 4, 2025 13:50
OpenWRT adblock implementation

Others have recently developed packages for this same functionality, and done it better than anything I could do. Use the packages instead of this script:

Description

In its basic usage, this script will modify the router such that blocked addresses are null routed and unreachable. Since the address blocklist is full of advertising, malware, and tracking servers, this setup is generally a good thing. In addition, the router will update the blocklist weekly. However, the blocking is leaky, so do not expect everything to be blocked.

@adammw
adammw / README.md
Created August 3, 2012 06:30
Node.js for Raspberry Pi

Node.js for Raspberry Pi

Pre-built binaries

Recent releases have been pre-built using cross-compilers and this script and are downloadable below.

If you have found these packages useful, give me a shout out on twitter: @adammw

@rcmachado
rcmachado / html5.vim
Created December 15, 2009 10:35
Vim syntax file for HTML 5
" Vim syntax file
" Language: HTML (version 5)
" Maintainer: Rodrigo Machado <[email protected]>
" URL: http://gist.github.com/256840
" Last Change: 2010 Aug 26
" License: Public domain
" (but let me know if you liked it :) )
"
" Note: This file just adds the new tags from HTML 5
" and don't replace default html.vim syntax file