Skip to content

Instantly share code, notes, and snippets.

View NikoTung's full-sized avatar
💭
wondering

Niko NikoTung

💭
wondering
View GitHub Profile
@NikoTung
NikoTung / geoip-cn
Last active January 4, 2024 15:06
geoip-cn
#!/bin/bash
#
## From https://github.com/Loyalsoldier/geoip 少了 MaxMind GeoLite2
# 主要是给mosdns 用,text 格式
urls=("https://raw.githubusercontent.com/gaoyifan/china-operator-ip/ip-lists/china6.txt" "https://raw.githubusercontent.com/gaoyifan/china-operator-ip/ip-lists/china.txt" "https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt")
## Download each file
for url in "${urls[@]}"; do
wget -P .temp/ "$url"
@NikoTung
NikoTung / ark
Last active August 11, 2021 01:44
KDE
ark -b -a -o <destination> file.tar.gz
-b extract without opening the GUI
-a auto subfolder
-o destination of the extracted file
package main
import (
"fmt"
"golang.org/x/tour/tree"
)
// Walk walks the tree t sending all values
// from the tree to the channel ch.
func Walk(t *tree.Tree, ch chan int) {
package main
import (
"fmt"
"math"
)
type ErrNegativeSqrt float64
func (e ErrNegativeSqrt) Error() string {
package main
import (
"fmt"
"strings"
)
type IPAddr [4]byte
func (p IPAddr) String() string {
{"sig":"aa78b347409d0de4b30afe1fb093445d3c88b14546abc1655e725f1355c42a2921963513aa280a92f5c6ebd133185c2fd38e6d86b3eec93547547c7b51de575c0","msghash":"4fa904c70bf5f968e2adc169d1e653e2ba6bcb33dd2c354b40568c1751f01215"}
#import <Foundation/Foundation.h>
@interface SuperClass : NSObject
@end
@implementation SuperClass
@end