网上存在各类通过命令行编辑深藏在 NAS 文件系统深处的某配置文件而实现某些高级功能的方法,就连群晖官方的技术支持也会提供这种方案。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import HTMLParser | |
from json import loads | |
from urllib2 import urlopen | |
from urllib import urlretrieve | |
from threading import Thread |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Append the following lines to: | |
# /usr/syno/etc/packages/VPNCenter/openvpn/openvpn.conf | |
push "redirect-gateway def1 bypass-dhcp" | |
push "dhcp-option DNS YOUR_DNS_SERVER" | |
push "dhcp-option PROXY_AUTO_CONFIG_URL http://wpad/proxy.pac" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o posix | |
TC=$0 | |
GLOBAL_EXCLUDES="\.git" | |
alert() { | |
msg=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Go testing cover profile filter | |
// @namespace https://github.com/tevino | |
// @version 0.1 | |
// @description Add a search input for go testing cover profile. | |
// @author Tevin Zhang | |
// @grant none | |
// @require https://code.jquery.com/jquery-2.2.4.min.js | |
// ==/UserScript== | |
var frame = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Screen resolutions | |
------------------ | |
PICO-8 supports different undocumented videomodes that can be activated at runtime, | |
using poke(0x5F2C, X) where X is one of the following mode numbers: | |
0: 128x128, 0 pages | |
1: 64x128, 1 page | |
2: 128x64, 1 page | |
3: 64x64, 3 pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
indent() { sed 's/^/ /'; } | |
confirm() { | |
msg=$1 || "Are you sure?" | |
msg="$msg (y/N)" | |
read -p "$msg" -n 1 -r | |
echo | |
[[ $REPLY =~ ^[Yy]$ ]] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
DEPS="ioreg ggrep jq ddcctl" | |
EXTERNAL_DISPLAY_NO=${EXTERNAL_DISPLAY_NO:-1} | |
RATIO=${RATIO:-100} # 0-100 | |
get-builtin-brightness() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Q&As | |
# | |
# Q: Why not use [paperkey][paperkey]? | |
# A: It brings much more complexity and dependencies, and I don't have time to check the implementation for security. | |
# | |
# Q: Why not OCR? | |
# A: I didn't find an open-source ocr software that works for normal photos. | |
# even though I used [OCR-A][OCR-A] for printing and [ScannerPro][ScannerPro] for image processing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Find Similar Contents. | |
-- Created by Christian Grunenberg on Thu Feb 10 2005. | |
-- Copyright (c) 2005-2014. All rights reserved. | |
-- Limit for more or less identical contents (0.0: no similarity, 1.0: almost identical) | |
property pLimit : 0.9 | |
-- Max. number of similar results to display |