Skip to content

Instantly share code, notes, and snippets.

@qoli
qoli / VOD.json
Created November 2, 2022 02:35
VOD.json
{
"uuid": "e24b4542-ce5d-4625-b2cb-e40429945328",
"json": [
{
"type": 1,
"name": "if101[屏蔽国内ip]",
"api": "http://api.if101.tv/v1/vod"
},
{
"type": 0,
@dslwind
dslwind / Ubuntu个人文件夹中文改英文
Last active January 20, 2025 15:43
将Ubuntu主文件下的中文目录名改为英文
## Ubuntu个人文件夹中文改英文
### 背景
选择中文安装好的Ubuntu系统主文件夹下的文件夹是中文的,例如`桌面`、`下载`、`图片`等,在终端下想要切换到这些文件夹就有点麻烦。
虽然Unity桌面环境可以通过切换系统语言来改名,但是Mate等桌面环境下就没这么“方便”。
### 命令行解决
打开终端,在终端中输入命令:
```
export LANG=en_US
@Lawrenauh
Lawrenauh / gist:9aaeb3fdad96c2ab79b3
Created January 10, 2016 16:12 — forked from lucifr/gist:1208100
Sublime Text 2 - 实用快捷键 (Mac OS X)
@soffchen
soffchen / surge.conf
Last active June 7, 2025 08:42
surge.conf
[General]
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
# dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114
loglevel = notify
[Proxy]
BJ-All = custom
BJ-HK-Azure = custom
BJ-US-Azure = custom
@MattDMo
MattDMo / ipy_repl.py
Last active April 3, 2022 23:16
SublimeREPL ipy_repl.py for running IPython/Jupyter in Sublime Text
# from https://gist.github.com/MattDMo/6cb1dfbe8a124e1ca5af
import os
import json
import socket
import threading
activate_this = os.environ.get("SUBLIMEREPL_ACTIVATE_THIS", None)
# turn off pager
@stevenworthington
stevenworthington / ipak.R
Created July 25, 2012 19:44
Install and load multiple R packages at once
# ipak function: install and load multiple R packages.
# check to see if packages are installed. Install them if they are not, then load them into the R session.
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
@darktable
darktable / SavWav.cs
Created April 6, 2012 05:01
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions: