Skip to content

Instantly share code, notes, and snippets.

View jiahut's full-sized avatar
🎯
Focusing

zhijia,.zhang jiahut

🎯
Focusing
View GitHub Profile
@jiahut
jiahut / polipo.config
Last active February 18, 2019 07:45
polico config proxy sock5 to http
# Sample configuration file for Polipo. -*-sh-*-
# /etc/polipo/config
# You should not need to use a configuration file; all configuration
# variables have reasonable defaults. If you want to use one, you
# can copy this to /etc/polipo/config or to ~/.polipo and modify.
# This file only contains some of the configuration variables; see the
# list given by ``polipo -v'' and the manual for more.
@jiahut
jiahut / Disable_Windows_Key.reg
Last active December 19, 2020 16:32
win helper reg script
Windows Registry Editor Version 5.00
; Created by: Shawn Brink
; http://www.sevenforums.com
; Tutorial: http://www.sevenforums.com/tutorials/75295-windows-key-enable-disable.html
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,5b,e0,00,00,5c,e0,00,00,00,00
@jiahut
jiahut / mac-optimize.md
Created February 18, 2019 02:21
mac optimize
@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'
$! 最近一次的错误信息
$@ 错误产生的位置
$_ get最近读的字符串
$. 解释器最近读的数
$& 最近一次与正则表达式匹配的字符串
@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() {

install

pip install gists.cli

usage

create

gists -c

# gem install pcap
require 'pcaplet'
class BWHost
attr_reader :ip
def initialize(ip)
@ip = ip
@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