Skip to content

Instantly share code, notes, and snippets.

View identifysun's full-sized avatar

sun jian identifysun

View GitHub Profile
def configuration = [
[
name : "Core",
repositories: "jenkins"
],
[
name : "Infra",
repositories: "*",
owner : "jenkins-infra"
@identifysun
identifysun / jenkins-api.md
Created November 3, 2020 11:14 — forked from justlaputa/jenkins-api.md
Jenkins Json API

jobs

jenkins_url + /api/json?tree=jobs[name,color]

builds

jenkins_url + /job/${job_name}/api/json?tree=builds[number,status,timestamp,id,result]

last build

@identifysun
identifysun / gist:2ca75e2a2cd607edcb1d064043581b45
Created June 29, 2020 05:05
How to fix AWS or Azure SUSE cloud instance missing software repositories
```bash
# rm /etc/SUSEConnect
# rm -f /etc/zypp/{repos,services,credentials}.d/*
# rm -f /usr/lib/zypp/plugins/services/*
# sed -i '/^# Added by SMT reg/,+1d' /etc/hosts
# /usr/sbin/registercloudguest --force-new
```
## Reference

当你使用 Mac OS X 系统自带当输入法,在键盘按住元音字符时(如字符 A),

会弹出与字符 A 相似的框供选择,如果是非元音字符,也未出现重复的按键字符:

元音字符:

非元音字符:

使用 EPEL源安装 Zabbix

Zabbix Server 安装

安装

$ yum list | egrep ^zabbix40
$ yum install zabbix40.x86_64 zabbix40-agent.x86_64 zabbix40-server.noarch zabbix40-server-mysql.x86_64 zabbix40-web.noarch zabbix40-web-mysql.noarch

基于 Mac OS X Python 开发环境配置

Python 安装

使用 Homebrew 安装 Python

Homebrew 默认将安装 Python 3,Python 2.x 系列版本在 2020 年停止维护:

$ brew update
@identifysun
identifysun / CA.md
Created January 20, 2020 01:21
CA certificate on linux

Centos 7

$ cp /root/<my-certification-file>.crt /etc/pki/ca-trust/source/anchors/
$ update-ca-trust

Ubuntu 14.04

@identifysun
identifysun / artifactory-get.sh
Created January 17, 2019 07:39 — forked from suicide/artifactory-get.sh
Downloads latest artifact version from artifactory
#!/bin/bash
# downloads latest version of an artifact from artifactory
set -e
usage(){
echo "Usage: $*" >&2
exit 64
}
@identifysun
identifysun / openresty.logrotate
Last active February 28, 2020 01:54
Openresty logrotate
/var/log/openresty/*.log {
daily
missingok rotate 52
compress delaycompress
notifempty create 640 nobody trusted
sharedscripts
postrotate
container_name=openresty
openresty_running=$(docker inspect --format="{{ .State.Running }}" $container_name 2> /dev/null)
if [ "$openresty_running" == "true" ]; then
@identifysun
identifysun / libjpeg-turbo.md
Last active March 5, 2018 10:08
If libjpeg-turbo official source download is slow, please use the following configuration.

copy libjpeg-turbo repository text paste it in /etc/yum.repos.d/libjpeg-turbo.repo

[libjpeg-turbo]
name = libjpeg-turbo official RPMs
baseurl = https://downloads.sourceforge.net/sourceforge/libjpeg-turbo
enabled = 1
gpgcheck = 1
gpgkey = http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x85C7044E033FDE16