Skip to content

Instantly share code, notes, and snippets.

View theharveyz's full-sized avatar
🕶️
NOOP

HarveyZ theharveyz

🕶️
NOOP
View GitHub Profile
@ledongthuc
ledongthuc / Readme.md
Last active March 23, 2020 08:19
[Github Actions][Go] Check pull requests before merging

Create template actions that's used to verify Go language pull requests before merging. It's easy to custom the flow, tools with your case.

Put pr_checker.yml or pr_checker_simple.yml to .github/workflows/ and see how it works with your pull requests. Make sure you are allows to use actions of Github.

  • pr_checker.yml is using by mine with full checking tools. It will make sure every Go langauge pull requests will be buildable, testable, passed security checking and error-able code checking.
  • pr_checker_simple.yml is more simpler with buildable, testable.

References:

worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
@ideawu
ideawu / quicksort
Last active June 29, 2021 08:29
快速排序QuickSort算法JavaScript实现, 包括 Hoare 和 Lomuto 版本的实现,以及网友实现版本的对比
<html>
<body>
<script>
// @author: ideawu
// @link: http://www.ideawu.net/blog/archives/1021.html
var swap_count = 0;
var cmp_count = 0;
// https://gist.github.com/wintercn/c30464ed3732ee839c3eeed316d73253
function wintercn_qsort(arr, start, end){
@ArthurHlt
ArthurHlt / gen-custom.sh
Last active August 2, 2023 06:37
Generate json schema for intellij terraform plugin on a community provider
#!/usr/bin/env bash
# Run `./gen-custom.sh github.com/myorg/myprovider provider-name version`
# e.g.: `./gen-custom.sh github.com/mevansam/terraform-provider-cf cloudfoundry v1.0.0`
# This will place a provider-name.json directly in $HOME/.terraform.d/schemas
CUR="$(pwd)"
out="$CUR/schemas"
mkdir -p "$out"
########### These MUST be filled in for a storm configuration
storm.zookeeper.servers:
- "10.10.74.41"
- "10.10.74.42"
- "10.10.74.43"
storm.zookeeper.root: "/jstorm"
cluster.name: "jstorm-uxin"
@yangl
yangl / 0-elasticsearch
Last active July 20, 2017 16:38
elasticsearch备忘
elasticsearch相关
1.安装
http://www.cnblogs.com/jstarseven/p/6803054.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/zip-targz.html
重要参数详见:https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html
2.常用插件
java.ci.totalTime = 8135593
java.cls.loadedClasses = 3053
java.cls.sharedLoadedClasses = 0
java.cls.sharedUnloadedClasses = 0
java.cls.unloadedClasses = 0
java.property.java.class.path = C:/Program Files (x86)/IDEA 2017.1/lib/jps-launcher.jar;C:/Program Files/Java/jdk1.8.0_102/lib/tools.jar;C:/Program Files (x86)/IDEA 2017.1/lib/optimizedFileManager.jar
java.property.java.endorsed.dirs = ""
java.property.java.ext.dirs = C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
java.property.java.home = C:\Program Files\Java\jdk1.8.0_102\jre
java.property.java.library.path = C:\Program Files\Java\jdk1.8.0_102\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS
@peterhellberg
peterhellberg / graceful.go
Last active June 11, 2024 12:27
*http.Server in Go 1.8 supports graceful shutdown. This is a small example.
package main
import (
"context"
"log"
"net/http"
"os"
"os/signal"
"time"
)
@JacksonTian
JacksonTian / time.js
Created January 11, 2017 08:12
TIME format
'use strict';
function pad(value) {
return (value < 10) ? '0' + value : '' + value;
}
class Time {
constructor(date) {
this.d = date;
}
@yangl
yangl / 新版Docker的Swarm模式 创建|部署|扩展|删除.md
Last active April 1, 2018 17:04
新版Docker的Swarm模式 创建|部署|扩展|删除,详见:http://www.dockerinfo.net/3837.html