Skip to content

Instantly share code, notes, and snippets.

View jiahut's full-sized avatar
🎯
Focusing

zhijia,.zhang jiahut

🎯
Focusing
View GitHub Profile

docker

docker run --name aria -d -p 6800:6800 -p 80:80 -v /mnt/sg/aria2_data:/data jiahut/aria2-ui:1

tools on debian

apt install net-tools -y

aria2 docker

say -v ? say -v Alex 'I love this game'

@jiahut
jiahut / install-ansible.md
Last active June 6, 2019 12:25
install latest ansible
@jiahut
jiahut / ansible_local_playbooks.md
Last active June 6, 2019 10:22 — forked from alces/ansible_local_playbooks.md
How to run an Ansible playbook locally

using Ansible command line:

ansible-playbook --connection=local 127.0.0.1, playbook.yml

using with sudo privileges

ansible-playbook -i localhost, install-docker-ce-centos.yaml -K
# gem install pcap
require 'pcaplet'
class BWHost
attr_reader :ip
def initialize(ip)
@ip = ip

install

pip install gists.cli

usage

create

gists -c

@jiahut
jiahut / play.groovy
Created May 24, 2019 06:54
jenkinsCli execute groovy script
package com.github.jiahut
import jenkins.model.Jenkins;
import hudson.remoting.*;
import jenkins.security.MasterToSlaveCallable;
import org.jenkinsci.remoting.RoleChecker;
import java.util.*;
public final class GetSystemProperties extends MasterToSlaveCallable<Properties,RuntimeException> {
public Properties call() {
$! 最近一次的错误信息
$@ 错误产生的位置
$_ get最近读的字符串
$. 解释器最近读的数
$& 最近一次与正则表达式匹配的字符串
@jiahut
jiahut / build.gradle
Last active May 22, 2019 10:34
slf4j.gradle
// Logging - slf4j logging to log4j2
// https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12
compile 'org.slf4j:slf4j-api:1.7.26'
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j-impl
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.11.2'
compile 'org.slf4j:jcl-over-slf4j:1.7.26'
compile 'org.apache.logging.log4j:log4j-api:2.11.2'
compile 'org.apache.logging.log4j:log4j-core:2.11.2'