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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
# This script create a Centos Minimal Unattended ISO | |
# This method is based on excellent article http://pyxlmap.net/technology/software/linux/custom-centos-iso | |
# | |
# This script has be tested with CentOS 7.2 (on the orign server) to install CentOS 7.2 (on the target server) | |
# TODO: | |
# * test package update to reduce the update task on the target system. The following command downloads all updates : | |
# (cd $CENTOS_CUSTOM_PATH/Packages ; yumdownloader $(for i in *; { echo ${i%%-[0-9]*}; } ) ) | |
# Some global settings : |
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
frontend http | |
bind 10.0.0.1:80 | |
mode http | |
# Add a new header with the environment variable and the path concatenated | |
http-request set-header X-ROUTING %[env(SERVER_AUTH)]::%[path] | |
# Then compare the value using a regular expression with back-references | |
# We need to use a named capture because of "reasons". Backreferences to normal captures seem to be rejected by HAProxy | |
use_backend app if { req.hdr(X-ROUTING) -m reg ^(?<auth>.+)==\1 } | |
# Cleanup in case we hadn't matched yet |
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 | |
# How to use | |
# 1. Replace the "YOURIP" to yourIP | |
#sed -i -e 's/YOURIP/192.168.x.x/g' setup-taiga-centos.sh | |
# 2. Run at the root | |
#source setup-taiga-centos.sh |
##ss-redir 的 iptables 配置(透明代理)
透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则
创建 /etc/ss-redir.json 本地监听 7777
运行ss-redir -v -c /etc/ss-redir.json
iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个
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/sudo sh | |
## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+. | |
## From `strings ruby_concealer.so`: | |
## | |
## > This obfuscation is intended to discourage GitHub Enterprise customers | |
## > from making modifications to the VM. | |
## | |
## Well, good, as long as its not intended to discourage *me* from doing this! |
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
import json | |
import uuid | |
from pathlib import Path | |
from urllib.parse import urlparse | |
from datetime import datetime | |
import html2text | |
import requests | |
from bs4 import BeautifulSoup |
OlderNewer