Skip to content

Instantly share code, notes, and snippets.

View wongsyrone's full-sized avatar
😂
Babysitting

Syrone Wong wongsyrone

😂
Babysitting
View GitHub Profile
@wongsyrone
wongsyrone / change.diff
Last active April 24, 2020 07:42
badvpn change to Lwip 1.4(.1 maybe)
diff --git a/src/core/ipv4/ip4.c b/src/core/ipv4/ip4.c
index 4b38999c..1acc2558 100644
--- a/src/core/ipv4/ip4.c
+++ b/src/core/ipv4/ip4.c
@@ -473,6 +473,12 @@ ip_input(struct pbuf *p, struct netif *inp)
}
}
+ /* if we're pretending we are everyone for TCP, assume the packet is for source interface if it
+ isn't for a local address */
# /etc/ssh/sshd_config
# after ssh auditing tool: https://github.com/arthepsy/ssh-audit
Ciphers [email protected],[email protected],[email protected],aes256-ctr,aes192-ctr,aes128-ctr
KexAlgorithms [email protected],diffie-hellman-group-exchange-sha256
MACs [email protected],[email protected],[email protected]
HostKeyAlgorithms [email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512
-pedantic -Wall -Wextra -Weffc++ -Werror
@wongsyrone
wongsyrone / takeown.bat
Created May 26, 2017 14:56
takeown windows
REM --v2 -----------------------------------------------------------
takeown /r /d y /f %1
icacls %1 /t /grant Everyone:F
pause
REM takeown /r /d y /f will set the owner to the Administrators group recursively.
REM /t makes it recursive
REM /grant Sets the permision to the following user, replaces existing permissions for the specified uesr.
REM :f Grants full controll permission.
REM ----------------------------------------------------------------
原帖地址: http://topic.csdn.net/u/20110113/19/b0d5d506-4307-428b-a61d-7974aa66a2da.html
首先要说明的是:这里介绍的方法都是大部分是本人“悟”出来的,所以网上难有流传!
好方法不能自己私藏,否则就白忙乎这几天了,分享给有需要的朋友们。如果有转载,敬请注明来自*CSDN老邓*作品。
呵呵,给自己打广告,实在是无耻之极,权当无聊之时打字之用。
欢迎流传,为最优秀的分布式版本管理系统Git做宣传!!
步骤:
1. 下载:http://loaden.googlecode.com/files/gitconfig.7z
2. 解压到:<MsysGit安装目录>/cmd/,例如:D:\Program Files\Git\cmd
@wongsyrone
wongsyrone / gist:279116d3939953150686c0afef50e369
Created April 29, 2017 23:05
.net framework verify and cleanup tool
https://blogs.msdn.microsoft.com/astebner/2015/07/31/net-framework-setup-verification-tool-cleanup-tool-and-detection-sample-code-now-support-net-framework-4-6-and-windows-10/
@wongsyrone
wongsyrone / a.h
Created December 8, 2016 06:50
Get struct address from one of its member's address
#include <stddef.h> /* offsetof */
#define start_addr(field_ptr, struct_type, field_name) ((struct_type *)((char *)(field_ptr) - offsetof(struct_type, field_name)))
#!/bin/sh
KERNEL=$1
PATCHVER=$2
[ -z "$1" -o -z "$2" ] && {
echo "usage: refresh_kernel.sh <version> <release>"
echo "example: refresh_kernel.sh 3.18 3.18.30"
exit 1
}
@wongsyrone
wongsyrone / 1.cs
Created September 13, 2016 13:05
Convert between System.Windows.Forms.Keys and System.Windows.Input.Key
Keys formsKey = Keys.A;
Key wpfKey = Key.A;
wpfKey = KeyInterop.KeyFromVirtualKey((int)formsKey);
formsKey = (Keys)KeyInterop.VirtualKeyFromKey(wpfKey);
// The KeyInterop class is the "key," plus the fact that the Windows Forms Keys enumeration has the same integer values as the Win 32 virtual key codes.