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
# https://gist.github.com/mangege/15a461896df109d16f12d2a815507061 | |
curl https://www.cloudflare.com/ips-v4 | awk '{print "allow " $1 ";"}' > /tmp/a.txt | |
curl https://www.cloudflare.com/ips-v6 | awk '{print "allow " $1 ";"}' >> /tmp/a.txt | |
cp /tmp/a.txt /etc/nginx/cloudflare-allow.conf | |
cat /etc/nginx/cloudflare-allow.conf |
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
# | |
# Automatically generated file; DO NOT EDIT. | |
# LEDE Configuration | |
# | |
CONFIG_MODULES=y | |
CONFIG_HAVE_DOT_CONFIG=y | |
# CONFIG_TARGET_arm64 is not set | |
# CONFIG_TARGET_sunxi is not set | |
# CONFIG_TARGET_apm821xx is not set | |
# CONFIG_TARGET_ath25 is not set |
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
var chkLen = jQuery('.module-list .list-view-item.item-active').length; | |
var startPosition = -1; | |
if (chkLen > -1) { | |
startPosition = Number(jQuery('.module-list .list-view-item.item-active:last').attr('_position')); | |
} | |
jQuery('.module-list .list-view-item.item-active .checkbox').click() |
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
require 'uri' | |
require 'net/http' | |
require 'timeout' | |
def check_server(ip) | |
uri = URI('http://ip.mangege.com/') | |
Timeout::timeout(3) do | |
Net::HTTP.start(ip, 80) do |http| | |
request = Net::HTTP::Get.new uri |
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
require 'net/http' | |
require 'json' | |
# 此类只是检测 token 是否有效 | |
# 如果前端有传 user_id 和 email 过来,其值还需与接口返回的值对比 | |
class AuthTokenUtil | |
class << self | |
=begin |
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
EnableMap := false | |
#IfWinActive ahk_class AcrobatSDIWindow | |
$LButton:: | |
if (A_ThisHotkey = A_PriorHotkey && A_TimeSincePriorHotkey < 200) | |
{ | |
if (EnableMap){ | |
EnableMap := false | |
ToolTip Disable success | |
} else { |