Skip to content

Instantly share code, notes, and snippets.

View a60814billy's full-sized avatar
🦝
I may be slow to respond.

Raccoon a60814billy

🦝
I may be slow to respond.
View GitHub Profile
@a60814billy
a60814billy / add_cdp.patch
Last active September 11, 2021 20:10
Add CDP extension in security_file_certgen. (based on squid-4.13.tar.gz)
--- squid-4.13/src/ssl/gadgets.cc 2020-08-23 02:37:05.000000000 +0800
+++ squid-4.13-modify/src/ssl/gadgets.cc 2021-09-12 04:02:25.362198387 +0800
@@ -544,6 +544,18 @@
return true;
}
+void add_ext(X509* cert)
+{
+ X509_EXTENSION *ex;
+ X509V3_CTX ctx;
@a60814billy
a60814billy / apply.sh
Last active September 9, 2021 08:47
ndpi-netfilter-kernel_5_6_patch
#!/bin/bash
wget https://gist.githubusercontent.com/a60814billy/175984c7742534e326ce973d4e7128eb/raw/f8bd0b73cc95aec51f6f3213e01d759830e3f555/kernel-module-sign.patch
patch -p 1 < kernel-module-sign.patch
wget https://gist.githubusercontent.com/a60814billy/175984c7742534e326ce973d4e7128eb/raw/f8bd0b73cc95aec51f6f3213e01d759830e3f555/ndpi-netfilter.patch
patch -p 1 < ndpi-netfilter.patch
pushd nDPI
wget https://gist.githubusercontent.com/a60814billy/175984c7742534e326ce973d4e7128eb/raw/f8bd0b73cc95aec51f6f3213e01d759830e3f555/nDPI-patch.patch
@a60814billy
a60814billy / node-v14.16.0-apple-silicon-support.patch
Created March 31, 2021 13:50
node-v14.16.0-apple-silicon-support.patch
From cb05459b972764fcf0db08113e656cd019f8eecd Mon Sep 17 00:00:00 2001
From: BoHong <a60814billy@gmail.com>
Date: Wed, 31 Mar 2021 10:30:50 +0800
Subject: [PATCH] apply patch from https://github.com/nodejs/node/pull/35986
apply: https://github.com/nodejs/node/pull/36368
apply: https://github.com/nodejs/node/pull/37276/files
apply: https://github.com/nodejs/node/pull/37471/files
package main
import "github.com/gin-gonic/gin"
func main() {
app := gin.Default()
app.GET("/", func(c *gin.Context) {
hostname := c.Request.Host
c.Writer.Write([]byte(hostname))
#!/bin/bash
# usage:
# ./fibvalid.sh numberOfFib actualNumber
# example:
# ./fibvalid.sh 10 55
# ok, fib(10) = 55
# ./fibvalid.sh 10 54
# fail, fib(10) = 55, not 54
<!-- /var/www/main-site/index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Main Product Site</title>
<body>
<h1>Hello !</h1>
<script>
document.write(location.search);
@a60814billy
a60814billy / .vimrc
Created March 6, 2020 14:05
My vim rc
" When started as "evim", evim.vim will already have done these settings, bail
" out.
if v:progname =~? "evim"
finish
endif
" Get the defaults that most users want.
source $VIMRUNTIME/defaults.vim
if has("vms")
var a = ""
var a = "";
@a60814billy
a60814billy / R.conf
Last active April 29, 2019 10:21
reset ospf router id
R3#show ip int bri
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 10.0.1.3 YES manual up up
Ethernet0/1 unassigned YES unset down down
Ethernet0/2 unassigned YES unset down down
Ethernet0/3 unassigned YES unset down down
Serial1/0 unassigned YES unset down down
Serial1/1 unassigned YES unset administratively down down
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down