Skip to content

Instantly share code, notes, and snippets.

View dofy's full-sized avatar
🐈‍⬛
wow

Seven Yu dofy

🐈‍⬛
wow
View GitHub Profile
@dofy
dofy / settings.json
Last active October 26, 2024 15:08
vscode-user-settings_workbench.editor.customLabels.patterns.json
{
"workbench.editor.customLabels.patterns": {
// Next.js
"**/app/**/page.tsx": "📄 ${dirname}",
"**/app/**/layout.tsx": "🏗️ ${dirname}",
"**/app/**/route.ts": "🛣️ ${dirname}",
"**/app/**/loading.tsx": "⏳ ${dirname}",
"**/app/**/error.tsx": "❌ ${dirname}",
"**/pages/**/index.tsx": "🏠 ${dirname(1)} / ${dirname(0)}",
"**/pages/**/*.tsx": "🏡 ${dirname(0)} / ${filename}",
@dofy
dofy / .autorc
Last active April 6, 2023 08:17
Auto run script when you enter any directory.
# Default Command
# Auto run `.auto` script under current work directory
[ -f .auto ] && source .auto
# Other scripts what you want to run
todo
// ==UserScript==
// @name Douban Hotkeys
// @description Show Hotkeys of douban.com in console
// @match *://www.douban.com/
// ==/UserScript==
const tables = []
function KEY(key, desc) {
this.key = key
@dofy
dofy / .auto_run
Last active April 6, 2023 06:58
Auto run any zsh/bash command in macOS Terminal when WD changed.
#!/bin/zsh
# any command e.g.
echo "auto run success..."
# save file to ~/.auto_run
# and
# chmod +x ~/.auto_run
@dofy
dofy / xyz.phpz.popclip.extension.format-json.yaml
Last active February 7, 2022 08:50
PopClip Extension - Format JSON
# popclip
name: Format JSON
icon: circle J
javascript: return JSON.stringify(JSON.parse(popclip.input.text), null, 2)
after: paste-result
@dofy
dofy / watch.sh
Last active April 13, 2019 01:44
Monitor the movie download folder and organize it. https://youtu.be/L98iF7MHxqc
#!/bin/bash
# Monitor the movie download folder and organize it.
# Author: Seven Yu <[email protected]>
# Version: 1.0
if [[ -z $1 ]]; then
echo "⚠️ You must input a path"
exit 1
fi
@dofy
dofy / awesome-mac-filter.user.js
Last active March 18, 2017 08:32
awesome-mac Filter
// ==UserScript==
// @name awesome-mac Filter
// @namespace http://phpz.org/
// @version 0.3.3
// @description awesome-mac Filter
// @author Seven Yu <[email protected]>
// @match https://github.com/jaywcjlove/awesome-mac
// @match https://github.com/jaywcjlove/awesome-mac/*/README.md
// @match https://github.com/jaywcjlove/awesome-mac/*/README-*.md
// @require http://code.jquery.com/jquery-3.1.0.min.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Type Script Demo</title>
<script src="//code.jquery.com/jquery-3.1.1.min.js"> </script>
<script src="main.js"></script>
<script>
var textScript = [
'This is an example...', '.3',
@dofy
dofy / php4nginx
Created October 20, 2016 06:18
php site for Nginx
server {
listen 80;
server_name domain.com;
access_log off;
root /path/to/your/website;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ /index.php$is_args$args;
@dofy
dofy / surge.conf
Last active September 24, 2017 02:13
如何修改原始 surge.conf 使之支持 proxy group
# 支持 proxy group 的 surge 配置
# You can download this config from: http://surge.run/config-example/ios.conf, edit with your computer and copy back to iOS device via iTunes or URL
[General]
// warning, notify, info, verbose
loglevel = notify
[Proxy]
// 首先增加一个直连配置,这样当你不需要代理的时候,
// 可以方便地选择跳过代理而不必退出或停止 surge。