Skip to content

Instantly share code, notes, and snippets.

@rampageX
rampageX / ExportNetEaseMusicSongList.js
Created January 29, 2022 13:08 — forked from tianshuo/ExportNetEaseMusicSongList.js
导出网易云音乐歌单到 AppleMusic / Spotify 等平台
/**
* 使用方法:
* 1. 用 Chrome 打开歌单的 web 页面(可以通过分享拿到链接,链接类似这样:http://music.163.com/playlist?id=xxx&userid=yyy)
* 2. 然后右键“检查”(如果有左上角有 device 选项,需要选择 Laptop 开头的,可以在 Edit/编辑 里添加)
* 3. 在 console 里输入下面脚本,即可输出 “歌曲名 - 歌手名” 格式的内容:
Springsteen - Eric Church
Chattahoochee - Alan Jackson
Baby Now That I Found You - Alison Krauss
Check Yes or No - George Strait
@rampageX
rampageX / nginx-tuning.md
Created September 29, 2021 21:59 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@rampageX
rampageX / Caddyfile
Created October 29, 2020 11:23 — forked from zrt/Caddyfile
用 Caddy 反代了一些网站
###################
# #
# SU.SG #
# #
###################
# https://mp.weixin.qq.com/s/H3OOqhFRr0YZGorIAlsCjA
# todo
# replace or remove content-security-policy header
@rampageX
rampageX / CAlculating.Hash.Checksums.Cascading.reg
Created May 15, 2020 12:58 — forked from AhmadFCheema/CAlculating.Hash.Checksums.Cascading.reg
Windows context menu, individual Hash calculation shortcut
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\Shell\Calculating.Hash.Checksums.Cascading]
"Extended"=""
"MUIVerb"="Calculate hash checksums"
"SubCommands"="MD2;MD4;MD5;SHA.1;SHA.256;SHA.384;SHA.512;All.Hash"
"Icon"="imageres.dll,262"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\MD2]
"Icon"="imageres.dll,262"
@rampageX
rampageX / InstallSocksServer.md
Created April 22, 2020 12:54 — forked from Leayal/InstallSocksServer.md
Install SOCKs server for Debian/Ubuntu machine. (http://www.inet.no/dante/download.html)

Installation

0. Requirements:

  • make
  • gcc
  • g++

To install those two, you can run apt-get update && apt-get install make gcc g++.

(Alternatively, you can install the package build-essential)

1. Download Danted

@rampageX
rampageX / danted_install_script.sh
Created April 12, 2020 09:41 — forked from duketwo/danted_install_script.sh
Dante-Server (danted) install script (Debian 8 - Jessie)
# Dante-Server install script (Debian 8 - Jessie)
# Start with 'chmod +x danted_install_script.sh && danted_install_script.sh'
# duketwo - 12.11.2017
random_pw=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
network_adapter=$(ip route | grep default | sed -e "s/^.*dev.//" -e "s/.proto.*//")
username="SallySample"
port="31337"
public_ip=$(dig +short myip.opendns.com @resolver1.opendns.com)
echo "Random password: $random_pw"
echo "deb-src http://ftp.de.debian.org/debian/ sid main non-free contrib" >> /etc/apt/sources.list
@rampageX
rampageX / reclaimWindows10.ps1
Created April 8, 2020 13:39 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@rampageX
rampageX / Workarounds for Netflix and the blocking of IPv6 tunnels.md Prevent proxy/VPN streaming error messages from Netflix when using an IPv6 tunnelf

Workarounds for Netflix and the blocking of IPv6 tunnels

The dreaded "You seem to be using an unblocker or proxy." error message. Cool story bro.

This gist was essentially created out of my own rant about Netflix being hostile to IPv6 tunnel services since June 2016. You are welcome to read my opinion on the matter, this is the more technical side to the issue and how to combat it within your own network.

Since I wrote this, various GitHub users have contributed their thoughts and ideas which has been incorporated into this gist. Thank you to everyone who have contributed their own methods and implementations.

The problem

Netflix now treats IPv6 tunnel brokers (such as Hurricane Electric) as proxy servers. A while ago it became apparent to users and Netflix that somewhat by accident, IPv6 tunnel users were being served content outside of their geolocation because of the way Netflix was identifying the tunnel servi

@rampageX
rampageX / angry_wifi.sh
Created March 5, 2020 09:41 — forked from lg/angry_wifi.sh
auto disconnects clients with a low signal strength on LEDE / OpenWRT
#!/bin/ash
#
# angry_wifi.sh
#
# auto disconnects clients with a low signal strength on LEDE / OpenWRT. great
# for clients who hold onto a lower-signal-strength accesspoint instead of
# roaming. before running, make sure to download the latest MAC addresses with:
#
# wget --no-check-certificate -O - 'https://services13.ieee.org/RST/standards-ra-web/rest/assignments/download/?registry=MAC&text=apple' | cut -d, -f2 > apple_mac_addresses
#
package main
import (
"crypto/tls"
"flag"
"io"
"log"
"net"
"net/http"
"net/http/httputil"