see https://pnpm.io/installation
$ pnpm --versioncorepack will NOT be distributed with Node.js v25>= https://nodejs.org/docs/latest-v24.x/api/corepack.html
see https://pnpm.io/installation
$ pnpm --versioncorepack will NOT be distributed with Node.js v25>= https://nodejs.org/docs/latest-v24.x/api/corepack.html
| package main | |
| import ( | |
| "fmt" | |
| syscall "golang.org/x/sys/unix" | |
| ) | |
| type DiskStatus struct { | |
| All uint64 `json:"all"` | |
| Used uint64 `json:"used"` |
| const TelegramBot = require('node-telegram-bot-api'); | |
| // replace the value below with the Telegram token you receive from @BotFather | |
| const token = YOUR_TOKEN; | |
| // read the doc from https://github.com/yagop/node-telegram-bot-api to know how to catch the chatId | |
| const chatId = CHAT_ID; | |
| const bot = new TelegramBot(token, { polling: false }); | |
| const telegrambot = (message, json) => { |
| # Typical use-case is decoding an AWS STS message. The DecodedMessage key contains escaped JSON. | |
| jq '.DecodedMessage | fromjson | .' message.json |
| FROM ubuntu:16.04 | |
| RUN apt update | |
| RUN apt install build-essential curl -y | |
| RUN apt install file -y | |
| RUN apt install asciinema -y | |
| RUN apt install unzip -y | |
| RUN apt install emacs24-nox -y | |
| RUN apt install vim -y | |
| RUN apt install nano -y |
| cd /etc/yum.repos.d | |
| curl -O https://copr.fedorainfracloud.org/coprs/librehat/shadowsocks/repo/epel-7/librehat-shadowsocks-epel-7.repo | |
| yum -y install shadowsocks-libev | |
| setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/ss-server | |
| cat > /etc/shadowsocks-libev/config.json << 'EOF' | |
| { | |
| "server": "0.0.0.0", | |
| "server_port": 443, | |
| "password": "p@$$w0rd", | |
| "method": "aes-128-gcm" |
| <Stream status | |
| Format status | |
| </Stream> | |
| <Redirect s> | |
| URL status | |
| </Redirect> | |
| # <Redirect index.html> | |
| # URL hubby.mjpg |
| func GetGzip(path string) string { | |
| println(path) | |
| client := &http.Client{ | |
| Transport: &transport.Transport{ | |
| ReadTimeout: 10 * time.Second, | |
| RequestTimeout: 15 * time.Second, | |
| }, | |
| } |
| #!/bin/bash | |
| # The script does automatic checking on a Go package and its sub-packages, including: | |
| # 1. gofmt (http://golang.org/cmd/gofmt/) | |
| # 2. goimports (https://github.com/bradfitz/goimports) | |
| # 3. golint (https://github.com/golang/lint) | |
| # 4. go vet (http://golang.org/cmd/vet) | |
| # 5. race detector (http://blog.golang.org/race-detector) | |
| # 6. test coverage (http://blog.golang.org/cover) | |
| set -e |