Skip to content

Instantly share code, notes, and snippets.

{
"rank_total" : 100,
"date" : "20180802",
"contents" : [
{
"user_id" : 5201223,
"illust_page_count" : "1",
"illust_series" : false,
"illust_upload_timestamp" : 1533085871,
"yes_rank" : 1,
@shellexy
shellexy / site.xxx.com.conf
Created February 15, 2018 15:56
nginx 示例配置由 certbot --webroot --installer nginx --redirect --keep --webroot-path 命令自动添加
## nginx configuration
server {
listen 80;
listen [::]:80;
root /var/www/site.xxx.com;
index index.php index.html index.htm index.nginx-debian.html;
server_name site.xxx.com;
@shellexy
shellexy / site.xxx.com.conf
Created February 15, 2018 15:56
nginx 示例配置由 certbot --webroot --installer nginx --redirect --keep --webroot-path 命令自动添加
## nginx configuration
server {
listen 80;
listen [::]:80;
root /var/www/site.xxx.com;
index index.php index.html index.htm index.nginx-debian.html;
server_name site.xxx.com;
@shellexy
shellexy / cf-ddns.sh
Created January 23, 2018 15:09 — forked from fffonion/cf-ddns.sh
Dynamic DNS script using Cloudflare API v4
#!/bin/bash
# can be A or AAAA
do_record=AAAA
# the interface to get ipv6 address
iface=eth0
# the static suffix we should add to
v6_suf=53
mail="me@email.com"
@shellexy
shellexy / NoCSS.js
Created January 6, 2018 11:44
去除网页样式的 bookmarklet 书签工具
javascript:
(function(){
if (f=document.querySelector('frame[name="Main"]')) {
window.location.href = f.src;
}
document.body.style.margin = "10%";
document.body.style.lineHeight = "2em";
document.body.bgColor = "#F5F5B5";
document.body.text = "#000000";
@shellexy
shellexy / quota_dir.sh
Last active January 6, 2018 13:57
使用文件系统镜像来实现文件夹容量限额
#!/bin/bash
## 使用文件系统镜像来实现文件夹容量限额
help()(
echo "设置目录限额
用法:
quota 添加一个限额目录
list 列出限额的目录
unquota 某目录不再限额
quit 退出程序
@shellexy
shellexy / wol.py
Last active December 8, 2017 15:37
wake on lan 远程唤醒计算机
#!/usr/bin/python
# -*- coding: utf-8 -*-
# wol.py 远程唤醒计算机
# 参见 http://code.activestate.com/recipes/358449-wake-on-lan/
# https://github.com/bentasker/Wake-On-Lan-Python
# 原作者 Fadly Tabrani, B Tasker,协议 PSF
## 可以改为自己需要远程唤醒的计算机的 MAC 地址
MACADDRESS = '00:13:0d:e4:60:61'
配置
安装::
sudo aptitude install openvpn udev lzop easy-rsa
生成 CA 证书::
sudo su
make-cadir /etc/openvpn/easy-rsa/2.0
@shellexy
shellexy / winetricks-zh.diff
Last active May 21, 2017 15:21
让 winetricks-zh 使用思源黑体 Noto Sans CJK SC
diff --git a/winetricks-zh b/winetricks-zh
--- a/winetricks-zh
+++ b/winetricks-zh
@@ -9857,6 +9857,20 @@ w_metadata fakechinese fonts \
load_fakechinese()
{
+ fc-list | grep -q "Noto Sans CJK SC Thin" && {
+ w_register_font_replacement "Microsoft JhengHei" "Noto Sans CJK SC Thin"
+ w_register_font_replacement "Microsoft YaHei" "Noto Sans CJK SC Thin"
修改 wifi 验证服务器地址
安卓 5.0~6.0 可以
adb shell settings put global captive_portal_server google.cn
安卓 7.0~7.1 同上并需要服务器支持 https
安卓 7.1.1 可以
adb shell settings put global captive_portal_https_url https://google.cn/generate_204
上述 google.cn 可以也换成 www.qualcomm.cn 高通中国的验证服务器