Skip to content

Instantly share code, notes, and snippets.

@Cergoo
Cergoo / tailwind.itermcolors
Created November 10, 2018 08:11 — forked from stidges/tailwind.itermcolors
An iTerm2 color scheme based on the Tailwind CSS color scheme (https://tailwindcss.com/docs/colors)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.18431372940540314</real>
@Cergoo
Cergoo / public_key_decrypt_gpg_base64.go
Created October 20, 2018 16:59 — forked from jyap808/public_key_decrypt_gpg_base64.go
Decrypting a base64 GPG public key encrypted string using a passphrase protected private key in ASCII armor format
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"encoding/base64"
"fmt"
"io/ioutil"
"log"
)
https://wiki.archlinux.org/index.php/Tmux_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)
http://gimmor.blogspot.ru/2012/10/tmux.html
Очень хороший способ запустить tmux:
tmux attach || tmux new — делая так, вы сперва пытаетесь подключиться к уже существующему серверу tmux, если он существует; если такого ещё нет — создаёте новый.
После этого вы попадаете в полноценную консоль.
Ctrl+b d — отключиться. (Точно так же вы отключитесь, если прервётся соединение. Как подключиться обратно и продолжить работу — см. выше.)
package main
import (
"bufio"
"net"
)
type Client struct {
incoming chan string
outgoing chan string
package main
import "fmt"
func collect(vals []int, f func(int) int) []int {
length := len(vals)
newVals := make([]int, length, length)
for i, val := range vals {
newVals[i] = f(val)