Skip to content

Instantly share code, notes, and snippets.

View YIN-Renlong's full-sized avatar

Renlong YIN-Renlong

View GitHub Profile
@MSFTserver
MSFTserver / disco_v5_plus_Win_Install.md
Last active June 25, 2023 02:13
guide to installing disco v5+ locally on windows

Install Disco Diffusion v5 for Windows

NOTE: Pytorch3d no longer has to be compiled i have stripped out the function we use to make this a lot easier and also so we do not have to use WSL2 with linux and can now run directly on your windows system.

Comments section is not checked often for issues please join the disco diffusion discord for assistance

https://discord.gg/mK4AneuycS

You may now use the official disco diffusion notebook with this tutorial as it has been uodated to reflect the changes here for better cross platform support

Enable bbr on Ubuntu 16.04

  1. Make sure kernel version is 4.9 or newer:

    uname -r

    Install Hardware Enablement Stack (HWE) to update kernel automaticly:

@klzgrad
klzgrad / Traffic analysis survey.md
Last active March 17, 2024 09:49
流量分类调研

为什么流量可以进行分类

这里的“流量”一般定义为中间人观测到的一组由(时间,方向,包大小)元数据组成的序列 [Cai2014]。其源头是应用层的读写操作,经过传输层协议的变换(分片、协议状态机、加密等),流量序列产生一定变化。但是这种变化非常有限,因为流量的发生过程本质是确定性的,随机因素较小,因此对于特定环境中的特定应用(浏览器访问 google.com)各种流量特征体现出相当大的一致性和独特性,这就使“从流量特征识别应用”的监督学习问题成为可能。虽然有若干不利因素使得确定性下降,例如多层次上软件多版本的排列组合爆炸、有状态的缓存、流水线和连接复用、用户随机行为,但是因为版本的幂律分布、应用层读写操作间的依赖关系、流量特征和检测算法的改进等原因,分类依然具有相当的可行性。

分类的对象:流量应用分类与网站指纹攻击

根据分类的对象产生了两个相近但是不同的研究领域。从流量特征中分类应用类型的被称为流量分类(traffic classification),从流量特征中分类所访问网站或者网页的被称为网站指纹(website fingerprinting)。以机器学习的方法而论前者是比后者更弱但本质相同的一个问题。

这两类攻击的威胁类型不同。流量分类威胁的是可用性,如果GFW检出流量是隧道应用然后进行封锁,则破坏了可用性。而网站指纹威胁的是匿名性和隐私,如果从隐秘流量中检出是谁在访问哪个网站,则破坏了匿名性,丝绸之路就是这样被FBI破获的。

@zz
zz / UbuntuCongestionControlBBR.md
Last active February 12, 2022 16:46 — forked from chalos/UbuntuCongestionControlBBR.md
Ubuntu using BBR
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@fyrebase
fyrebase / guide.md
Created December 2, 2015 10:02
Setup individual pools for PHP-FPM and NGINX - http://www.binarytides.com/php-fpm-separate-user-uid-linux/

Php-FPM

Php fpm is the new way to setup php to run with your webserver. Php-fpm is a fastcgi process manager for php that is totally separate from the webserver. The webserver communicates with fpm through a socket and passes the name of the script to execute. So fpm can run with any web server that is fastcgi compatible.

I recently moved from my old shared hosting to linode. Linode provides linux vps hosting at economic prices. However the servers are totally unmanaged are just raw linux machines that have shell access. So through the shell you have to setup everything including the web server, php and the web files.

So this time I decided to go with the combination of nginx and php-fpm. I had multiple sites to setup on this new webserver. Nginx deals with these through separate server blocks (aka vhost in apache). However there was another thing needed. Php on each site should run with its own user and not the nginx common user named www-data.

Running each site with its own uid/gid is more secure and

@soffchen
soffchen / Surge.md
Last active August 10, 2023 13:56
Surge

Feature

  • 替代 PAC,实现根据规则区分选择代理线路
  • 支持 SOCKS5 和 Shadowsocks 协议
  • 完整支持所有的 Shadowsocks 加密方式 (table, rc4-md5, salsa20, chacha20, aes-256-cfb, aes-192-cfb, aes-128-cfb, bf-cfb, cast5-cfb, des-cfb, rc2-cfb, rc4, seed-cfb)
  • 全面支持双向 HTTP Keep-Alvie
  • 快,各种黑科技加速
  • 直接临时修改某个域名的访问规则 (暂时仅 Mac 版本)
  • 支持使用 GeoIP 规则决定线路

Usage

@klzgrad
klzgrad / Naive-VPN.md
Created November 17, 2014 00:43
朴素VPN:一个纯内核级静态隧道

朴素VPN:一个纯内核级静态隧道

由于路由管控系统的建立,实时动态黑洞路由已成为最有效的封锁手段,TCP连接重置和DNS污染成为次要手段,利用漏洞的穿墙方法已不再具有普遍意义。对此应对方法是多样化协议的VPN来抵抗识别。这里介绍一种太简单、有时很朴素的“穷人VPN”。

朴素VPN只需要一次内核配置(Linux内核),即可永久稳定运行,不需要任何用户态守护进程。所有流量转换和加密全部由内核完成,原生性能,开销几乎没有。静态配置,避免动态握手和参数协商产生指纹特征导致被识别。并且支持NAT,移动的内网用户可以使用此方法。支持广泛,基于L2TPv3标准,Linux内核3.2+都有支持,其他操作系统原则上也能支持。但有两个局限:需要root权限;一个隧道只支持一个用户。

朴素VPN利用UDP封装的静态L2TP隧道实现VPN,内核XFRM实现静态IPsec。实际上IP-in-IP隧道即可实现VPN,但是这种协议无法穿越NAT,因此必须利用UDP封装。内核3.18将支持Foo-over-UDP,在UDP里面直接封装IP,与静态的L2TP-over-UDP很类似。

创建一个朴素VPN

@technoknol
technoknol / allow-html-in-widget-title.php
Last active April 19, 2021 09:46
Wordpress - Allow HTML tags in Widget Title - No Plugin Required
<?php
/*
* Author : TechnoKnol
* Blog : http://technoknol.blogspot.com
* Purpose : Allow HTML tags in Widget Title in WordPress
*
* */
// Add below code in your theme's functions.php file
// Allow HTML tags in Widget title
function html_widget_title( $var) {
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 7, 2024 09:29
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k