Skip to content

Instantly share code, notes, and snippets.

@dallaslu
dallaslu / sort_by_time.py
Created October 20, 2021 04:07
Sort Beancount Entries by meta['time']
"""Sort Beancount Entries by meta['time']
Although beancount says that time is meaningless, there are situations
where an account that should not be negative may have a negative balance
at some point because transfers that occurred on the same day are
scheduled later and spending records are scheduled earlier.
This is not a big deal, but it is a bit odd.
2021-10-01 balance Assets:Cash 500 USD
#!/bin/sh
/Applications/Discord.app/Contents/MacOS/Discord --proxy-server=http://po.cc.ibaraki-ct.ac.jp:3128
@YcSmile
YcSmile / note.txt
Created July 8, 2019 13:36
Linux 英文系统下,切换wps界面语言为中文
当前wps版本 11.1.0.8722
1 方法一
修改配置文件
nano ~/.config/Kingsoft/Office.conf
[General]
languages=
@wzyboy
wzyboy / amortize_over.py
Last active October 30, 2024 16:48 — forked from cdjk/amortize_over.py
amortize_over beancount plugin
# Copyright (c) 2017 Cary Kempston
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all
@opensvn
opensvn / nutstore_git.sh
Last active September 2, 2017 07:17
If a file in local git repository has no write permission, nutstore will stuck in analyzing that file. This script add write permission to the files modified in a day, so nutstore can upload those files.
#!/usr/bin/env bash
today=`date +%Y-%m-%d`
check_modify_time() {
file=$1
modify_date=`stat $file | grep -i Modify | awk -F. '{print $1}' | awk '{print $2}'`
if [ ${today} = ${modify_date} ]; then
return 0
fi
@lubien
lubien / stickers-downloader.js
Last active October 30, 2024 10:46
Download all visible telegram stickers images
// How to download telegram sticker images
/*
1. Go to Telegram Web;
2. Open console (F12);
3. Paste the code below in the console and press Enter;
4. Open your stickers menu and make sure you see the sticker pack you want to download (so Telegram will load it).
5. At the console paste and run "downloadStickers()" any time you want to download a pack.
6. [Convert .webm to another format](http://www.freewaregenius.com/convert-webp-image-format-jpg-png-format/);
7. Happy hacking.
@ficapy
ficapy / README.md
Last active February 1, 2022 20:42
代理设置

现在比较主流的方案可能就是SSR+kcptun了,基本上都能流畅看1080P的youtube了。下面讲述如何快速搭建服务端和客户端(主要针对osx和unix,win上有成熟的GUI方案)

服务端

SSR一键安装包(引用自https://www.91yun.org/archives/2079)

wget -N --no-check-certificate https://raw.githubusercontent.com/91yun/shadowsocks_install/master/shadowsocksR.sh && bash shadowsocksR.sh

https://github.com/xtaci/kcptun/releases下载适合自己系统的最新版本tar -xf解压得到server_linux_amd64.执行服务端.摘录文档如下

@cvan
cvan / set-up-chromium-keys.md
Last active September 18, 2024 15:35
Launch Chromium with API Keys on Mac OS X and Windows

Last Updated: March 2023

IMPORTANT: Ignore the out-of-date steps below for getting Chromium keys.

Instead, read this up-to-date guide (Jan 2023) written by @LearningToPi.

P.S. Thank you to every contributor below who provided tips over the years on what should be a straightforward process: setting up Chromium for local development.

Long live the web!

@shar0
shar0 / hover-to-rate.html
Created September 15, 2015 15:55
Hover square to rate
<html>
<head>
<title>Drag to rate</title>
<style>
* {
padding: 0;
margin: 0;
}
.rate-bar {
margin: 10px;
@baptx
baptx / twitter_api_1.1_backup.js
Last active May 30, 2024 15:47
Twitter API 1.1 tweets / favorites (likes) / following / followers backup in web browser
/* Twitter API 1.1 tweets / favorites (likes) / following / followers backup in web browser
* Get your access keys to use Twitter API 1.1: https://dev.twitter.com/docs/auth/tokens-devtwittercom
* You can change Twitter API URL and Twitter screen_name, then execute script from a trusted web page without CSP protection like about:blank in a web browser console (F12 or Ctrl+Shift+K shortcut)
* A textarea will appear so you can copy/paste to save data as a CSV file or search tweets / users in your web browser (Ctrl+F shortcut)
* You can then view your backup in a spreadsheet editor like LibreOffice Calc
* You can also compare the backup with another one to see who unfollowed you, who changed their Twitter username by looking at the user ID or which tweet you retweeted / favorited was deleted (e.g. with the Linux diff command)
*
* Note about the tweets backup:
* Usually you will search tweets that you retweeted using Twitter web version (https://twitter.com/search) with a search like "from:your_username f