Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"io"
"os"
"strings"
"sync"
"time"
package foreignkey
import (
"errors"
"fmt"
"reflect"
"regexp"
"strings"
)
#!/bin/sh
set -e
pacman-mirrors -c China
echo '[archlinuxcn]
SigLevel = Optional TrustedOnly
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch' >> /etc/pacman.conf
pacman -Syyu
pacman -S archlinuxcn-keyring
echo 'export GTK_IM_MODULE=fcitx
@zhnxin
zhnxin / zabbix_client_v2.go
Last active September 26, 2018 06:29
golang to get zabbix graph by itemis with timeout and retry
// Copyright (C) 2018 郑欣 <zhngxin@aliyun.com>
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@zhnxin
zhnxin / zabbix_client.go
Last active August 21, 2018 10:24
golang to get zabbix graph by itemid
// Copyright (C) 2018 郑欣 <zhngxin@aliyun.com>
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the