Skip to content

Instantly share code, notes, and snippets.

View mingliangguo's full-sized avatar

Mingliang mingliangguo

View GitHub Profile
@vkroz
vkroz / Kafka commands.md
Last active January 21, 2024 12:12
Kafka frequent commands

Kafka frequent commands

Assuming that the following environment variables are set:

  • KAFKA_HOME where Kafka is installed on local machine (e.g. /opt/kafka)
  • ZK_HOSTS identifies running zookeeper ensemble, e.g. ZK_HOSTS=192.168.0.99:2181
  • KAFKA_BROKERS identifies running Kafka brokers, e.g. KAFKA_BROKERS=192.168.0.99:9092

Server

Start Zookepper and Kafka servers

@toanalien
toanalien / sources.list
Last active May 20, 2018 13:40
/etc/apt/sources.list ubuntu 14.04
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#
###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
###### Ubuntu Update Repos
@dhanifudin
dhanifudin / zshrc.zsh
Created July 23, 2016 11:05
Integrate prezto with zplug
export ZPLUG_HOME=$HOME/.zplug
source $ZPLUG_HOME/init.zsh
zmodload zsh/zprof
zplug "zplug/zplug"
# Prezto framework
zplug "sorin-ionescu/prezto", \
use:"init.zsh", \
@subfuzion
subfuzion / curl.md
Last active May 13, 2025 18:51
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@subdigital
subdigital / minimal-vim.sh
Last active August 17, 2021 15:44
minimal vim setup for linux servers / vms + swift
#! /bin/bash
set -e
if [[ -f ~/.vimrc ]]
then
echo "You already have a ~/.vimrc. Aborting to avoid losing data..."
exit 1
fi
@vasanthk
vasanthk / System Design.md
Last active May 17, 2025 07:44
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@adrianhall
adrianhall / .eslintrc.js
Last active April 29, 2024 15:01
A sample .eslintrc file
var OFF = 0, WARN = 1, ERROR = 2;
module.exports = exports = {
"env": {
"es6": true
},
"ecmaFeatures": {
// env=es6 doesn't include modules, which we are using
"modules": true
Error: Failed to update tap: caskroom/versions
brew untap caskroom/cask
brew update
brew cleanup --force -s
rm -rf "$(brew --cache)"
brew tap caskroom/cask
This removed what I believe is a unnecessary single quote in the rm command and a period that was probably not intended after the last command
Also in my case, I needed to add sudo for the remove command
@softwarespot
softwarespot / .jsbeautifyrc
Last active January 8, 2023 10:42
JS Beautifier configuration
// Documentation: https://github.com/beautify-web/js-beautify
// Example URL: https://github.com/victorporof/Sublime-HTMLPrettify/blob/master/.jsbeautifyrc
// Based on Airbnb's JavaScript Style Guide, URL: https://github.com/airbnb/javascript
{
// Collapse curly brackets
"brace_style": "collapse",
// Break chained method calls across subsequent lines
"break_chained_methods": true,