Skip to content

Instantly share code, notes, and snippets.

@18o
18o / Top Languages.md
Created December 21, 2024 09:12
Top Languages

18o's Top Languages

@18o
18o / πŸ“Š Weekly development breakdown
Last active October 26, 2024 11:23
πŸ“Š Weekly development breakdown
Python πŸ•“ 561h43m β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 49.2%
Rust πŸ•“ 164h51m β–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 14.4%
Vue.js πŸ•“ 83h15m β–ˆβ–Œβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 7.3%
Dart πŸ•“ 71h27m β–ˆβ–Žβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 6.3%
TOML πŸ•“ 49h36m β–‰β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 4.3%
@18o
18o / StreamToString.go
Created November 14, 2017 13:16 — forked from tejainece/StreamToString.go
Golang: io.Reader stream to string or byte slice
import "bytes"
func StreamToByte(stream io.Reader) []byte {
buf := new(bytes.Buffer)
buf.ReadFrom(stream)
return buf.Bytes()
}
func StreamToString(stream io.Reader) string {
buf := new(bytes.Buffer)
@18o
18o / gbkbig5.go
Last active June 26, 2018 09:19 — forked from zhang0098/gbkbig5.go
Golang GBK Big5 from/to UTF-8 转捒
import (
"bytes"
"io/ioutil"
"golang.org/x/text/encoding/traditionalchinese"
"golang.org/x/text/encoding/simplifiedchinese"
"golang.org/x/text/transform"
)
//convert GBK to UTF-8
func Decodegbk(s []byte) ([]byte, error) {
I := bytes.NewReader(s)
@18o
18o / unicode2utf8.go
Last active February 12, 2020 10:22
golang unicode to utf8
func unicode2utf8(source string) string {
var res = []string{""}
sUnicode := strings.Split(source, "\\u")
var context = ""
for _, v := range sUnicode {
var additional = ""
if len(v) < 1 {
continue
}
if len(v) > 4 {
@18o
18o / supervisord-example.conf
Created August 15, 2017 06:56 — forked from Sapphire64/supervisord-example.conf
Running virtualenv tornado in supervisord, running virtualenv celery in supervisord
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
::-webkit-scrollbar {
width: 10px !important;
height: 10px !important;
-webkit-appearance: none
}
::-webkit-scrollbar-thumb {
height: 5px;
border: 1px solid transparent;
border-top: none;