Skip to content

Instantly share code, notes, and snippets.

View kelein's full-sized avatar
🤒
Out sick

Kallen Ding kelein

🤒
Out sick
  • Kuiper Belt
View GitHub Profile
@kelein
kelein / logstash.conf
Created December 19, 2017 02:58 — forked from irq0/logstash.conf
logstash config - extract data from ceph logs
input {
gelf {
port => 12222
type => gelf
codec => json { }
}
}
filter {
if [type] == "gelf" {
@kelein
kelein / gist:1a6d5a3ec349937c0a38797800911521
Created May 1, 2018 08:31 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@kelein
kelein / zookeeperKafka.py
Created May 8, 2018 07:58 — forked from tromika/zookeeperKafka.py
Python script to get Kafka Brokers from Zookeeper
from kazoo.client import KazooClient
import json
####
# A quick function to get Kafka brokers from Zookeeper
###
# Probably you need only the first one because the broker will advertise the other brokers
# This is need only for producers due there you can only use bootstrap servers
# Arguments
@kelein
kelein / Dockerfile
Created June 27, 2018 12:53 — forked from dukelion/Dockerfile
Rocksdb tools image
# docker-rocksdb
Alpine Linux image with compiled and installed RocksDB with all compression libraries
dukelion@x1-carbon:~/source/docker-rocksdb$ cat Dockerfile
FROM golang:1.8-alpine
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >>/etc/apk/repositories && \
echo "@community http://nl.alpinelinux.org/alpine/edge/community" >>/etc/apk/repositories
RUN apk add --update --no-cache build-base linux-headers git cmake bash #wget mercurial g++ autoconf libgflags-dev cmake bash jemalloc perl
RUN apk add --update --no-cache zlib zlib-dev bzip2 bzip2-dev snappy snappy-dev lz4 lz4-dev zstd@community zstd-dev@community jemalloc jemalloc-dev libtbb-dev@testing libtbb@testing
@kelein
kelein / git-branch.md
Created September 19, 2018 16:42 — forked from yisibl/git-branch.md
在Mac、Linux 终端显示 Git 当前所在分支

在Mac、Linux 终端显示 Git 当前所在分支

  1. 进入你的home目录
cd ~
  1. 编辑.bashrc文件
@kelein
kelein / custom-loki.sh
Created September 28, 2018 19:48 — forked from evertontrindade/custom-loki.sh
Things to do after install Elementary OS Loki (0.4)
# First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
# Clean-up System
sudo apt-get purge epiphany-browser epiphany-browser-data #browser
sudo apt-get purge midori-granite #browser
sudo apt-get purge noise
sudo apt-get purge scratch-text-editor #text-editor
sudo apt-get purge modemmanager
sudo apt-get purge geary #email
@kelein
kelein / nvidia-elementaryos-loki.md
Created October 13, 2018 05:51 — forked from Jiab77/nvidia-elementaryos-loki.md
nVidia drivers installation on ElementaryOS - Loki (ubuntu 16.04 based distrib)

nVidia drivers installation on ElementaryOS - Loki

Introduction

ElementaryOS - Loki is an amazing ubuntu based distribution, I've just felt in love on it BUT they've removed what's required to install easily the nVidia Proprietary drivers. So here is the reason of this gist, to store the install instructions in one place inside a crystal clear documentation.

Check your device

@kelein
kelein / uwgi-medium-post.ini
Created April 21, 2022 02:42 — forked from sumitsk20/uwgi-medium-post.ini
uwsgi configuration with most commonly sused options for highly scalable website (medium blog post)
[uwsgi]
# telling user to execute file
uid = bunny
# telling group to execute file
gid = webapps
# name of project you during "django-admin startproject <name>"
project_name = updateMe
@kelein
kelein / main.go
Created July 15, 2022 07:08 — forked from roidelapluie/main.go
Read Alertmanager NFLOG
package main
import (
"errors"
"flag"
"fmt"
"io"
"os"
"github.com/gogo/protobuf/jsonpb"
@kelein
kelein / main.go
Created September 30, 2022 02:31 — forked from fl64/main.go
golang prometheus exporter example
package main
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"log"
"math/rand"
"net/http"
"time"