Skip to content

Instantly share code, notes, and snippets.

View zacker330's full-sized avatar
🌧️

Jack Zhai zacker330

🌧️
View GitHub Profile
@ivankra
ivankra / .python-grpc-bazel-example
Last active July 22, 2024 02:00
Minimal example of a python grpc server built with bazel.
$ bazel build ...
$ bazel run :greeter_server
Listening on :50051
$ bazel run :greeter_client
Greeter client received: Hello, you!
@mobeigi
mobeigi / alertmanager_webhook_payload_example.json
Last active March 1, 2024 07:24
Alertmanager Webhook Payload Example
{
"receiver": "webhook",
"status": "firing",
"alerts": [
{
"status": "firing",
"labels": {
"alertname": "Test",
"dc": "eu-west-1",
"instance": "localhost:9090",
@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active April 9, 2025 09:48
Docker Container Logging using Promtail
@bo01ean
bo01ean / webpack.config.js
Created February 28, 2019 09:20
swc-loader for create-react-app webpack
'use strict';
const fs = require('fs');
const path = require('path');
const webpack = require('webpack');
const resolve = require('resolve');
const PnpWebpackPlugin = require('pnp-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
@MrCoder
MrCoder / zenuml.dsl
Last active April 18, 2018 02:25
DSL examples for Web Sequence Chrome Extension (Get the extension from https://chrome.google.com/webstore/detail/web-sequence/kcpganeflmhffnlofpdmcjklmdpbbmef?ref=gist)
// Hello World
ZenUML.Hello(World)
// Simple RESTful API implementation
BookController.get(bookId) {
BookService.get(bookId) {
BookRepository.findOne(bookId)
}
}
@gwsu2008
gwsu2008 / jenkins-ping-thread-config
Last active July 28, 2020 12:55
Jenkins Ping Thread
-Dhudson.remoting.Launcher.pingTimeoutSec=240
-Dhudson.remoting.Launcher.pingIntervalSec=0 (slave)
-Dhudson.slaves.ChannelPinger.pingIntervalSeconds=0 (master)
@sivel
sivel / inventory2json.py
Last active December 19, 2023 01:54
Ansible inventory to dynamic inventory JSON output, accepts all inventory input formats
import sys
import json
from ansible.parsing.dataloader import DataLoader
try:
from ansible.inventory.manager import InventoryManager
A24 = True
except ImportError:
from ansible.vars import VariableManager
@jmaxhu
jmaxhu / .git-commit-template.txt
Last active August 21, 2023 06:29 — forked from adeekshith/.git-commit-template.txt
一份建议的git commit模板
# <类型>: (类型的值见下面描述) <主题> (最多50个字)
# 解释为什么要做这些改动
# |<---- 请限制每行最多72个字 ---->|
# 提供相关文章和其它资源的链接和关键字
# 例如: Github issue #23
# --- 提交 结束 ---
# 类型值包含
@fideloper
fideloper / install_mysql.sh
Last active July 1, 2020 10:13
instal mysql5.7 non-interactive on ubuntu 14.04
#!/usr/bin/env bash
# This is assumed to be run as root or with sudo
export DEBIAN_FRONTEND=noninteractive
# Import MySQL 5.7 Key
# gpg: key 5072E1F5: public key "MySQL Release Engineering <[email protected]>" imported
apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 5072E1F5
echo "deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-5.7" | tee -a /etc/apt/sources.list.d/mysql.list