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 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created October 13, 2017 01:10 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@wongsyrone
wongsyrone / LilLambda.ipynb
Created October 4, 2017 02:20 — forked from vakila/LilLambda.ipynb
Anjana Vakil, "Mary had a little lambda", EuroPython 2017: https://ep2017.europython.eu/conference/talks/mary-had-a-little-lambda
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wongsyrone
wongsyrone / gist:76f10469c383d6b257c85afd8da6e7ee
Last active November 22, 2017 00:18
openwrt/lede mac80211(compat-wireless/backports)
example: ./gentree.py --refresh --git-revision v4.14-rc1 --clean /home/hauke/linux/linux-next-clean/ ../backports-4.14-rc1
mine:
# needed by gentree.py
apt-get install coccinelle
git clone https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git
pushd backports
git checkout master
@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 aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com
HostKeyAlgorithms ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,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/