Skip to content

Instantly share code, notes, and snippets.

View qct's full-sized avatar
🐛
Making bugs

qct

🐛
Making bugs
View GitHub Profile
@fly9i
fly9i / Travel.md
Last active December 23, 2015 04:09
GOTO TIBET

####Travel to Tibet

物品清单

  • 冲锋衣/羽绒服
  • 保暖内衣
  • 冲锋裤/牛仔裤等
  • 登山鞋/运动鞋
  • 拖鞋
  • 洗发、洗脸、牙刷、防晒、唇膏
  • 帽子
@tanchao90
tanchao90 / my.cnf
Last active November 30, 2019 21:36
mysql-5.7.19 customized config file
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#

kafka 集群安全认证配置

本文主要介绍下 kafka 0.10.0 版如何实现sasl/plain认证机制及权限控制

kafka安全机制

kakfa 的安全机制主要分为两部分:

  • 身份认证(Authentication): 对客户端的身份进行认证
  • 权限控制(Authorization): 对topic级别的权限进行控制

kafka 身份认证

kafka 目前支持 SSL,SASL(Kerberos),SASL(PLAIN) 三种认证机制。

@premchalmeti
premchalmeti / .zshrc
Last active May 11, 2022 13:29
My zsh profile
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#export ZSH_THEME="robbyrussell"
export ZSH_THEME="gnzh"
@raftheunis87
raftheunis87 / eslint-prettier-typescript
Last active January 26, 2023 16:55
ESLint with airbnb and Prettier for Typescript
1) install dependencies:
yarn add @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-airbnb-typescript eslint-config-prettier eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier --dev
2) create .eslintrc.js file:
```
module.exports = {
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
extends: [
@artyom
artyom / rpc-tls-client.go
Last active October 9, 2023 15:44
Go RPC over TLS.You have to create the following keys: certs/client.crt, certs/client.key, certs/server.crt, certs/server.key. client.crt and server.crt should be signed with ca.crt, which should be concatenated to both client.crt and server.crt. It's easier to do with easy-rsa: http://openvpn.net/index.php/open-source/documentation/howto.html#pki
package main
import (
"crypto/tls"
"crypto/x509"
"log"
"net/rpc"
)
func main() {
object "Contract" {
code {
datacopy(0, dataoffset("runtime"), datasize("runtime"))
return(0, datasize("runtime"))
}
object "runtime" {
code {
if iszero(calledByOwner()) { revert(0, 0) }
switch selector()
case 0x00 {
@ryssroad
ryssroad / sei-2.json
Created July 22, 2022 08:23
ping.pub sei2
{
"chainId": "atlantic-1",
"chainName": "sei-testnet",
"rpc": "https://sei-api.theamsolutions.info",
"rest": ["http://161.97.82.203:26457","http://158.101.209.61:12657"],
"bip44": {
"coinType": "505"
},
"coinType": "505",
"bech32Config": {
@zanshin
zanshin / .zshrc
Created August 12, 2011 19:09
My .zshrc file
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#export ZSH_THEME="robbyrussell"
export ZSH_THEME="zanshin"
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active April 18, 2024 18:06 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话: