This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package byteslicer | |
| func Copy(a []byte) []byte { | |
| b := make([]byte, len(a)) | |
| copy(b, a) | |
| return b | |
| } | |
| func Cut(a []byte, i, j int) []byte { | |
| copy(a[i:], a[j:]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * // Copyright (c) 2021. Scott Cagno. All rights reserved. | |
| * // Use of this source code is governed by a BSD-style (clause 3) | |
| * // license that can be found in the root of this project in the LICENSE file. | |
| */ | |
| package bptree | |
| import ( | |
| "bytes" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "encoding/binary" | |
| "io/ioutil" | |
| "log" | |
| "fmt" | |
| ) | |
| const ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "syscall" | |
| "unsafe" | |
| ) | |
| func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package bitvec | |
| import ( | |
| "log" | |
| "go/build" | |
| ) | |
| // this is the word size of an int(32) | |
| // in bits. an int(32) requires a min- | |
| // imum of 4 bytes, each of which are |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "os/exec" | |
| "time" | |
| ) | |
| func run(timeout int, command string, args ...string) string { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| IP=$1 | |
| LOC=$(curl -s ipinfo.io/$IP | sed -r 's/[{}]|("[a-z]+":\ )|("|",)|//g') #| tac | sed '1,4d' | tac | sed '1,3d') | |
| echo -e "\n $IP\n$LOC\n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bytes" | |
| "compress/gzip" | |
| "fmt" | |
| "io" | |
| ) | |
| var dat = []byte(`[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Site Maintenance</title> | |
| <meta charset="UTF-8"> | |
| </head> | |
| <style> | |
| body { | |
| text-align: center; | |
| padding: 100px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type T struct { | |
| Id int | |
| Name string |