Skip to content

Instantly share code, notes, and snippets.

View geunho's full-sized avatar
๐ŸŽฏ
Focusing

Geunho Kim geunho

๐ŸŽฏ
Focusing
View GitHub Profile
@marwei
marwei / how_to_reset_kafka_consumer_group_offset.md
Created November 9, 2017 23:39
How to Reset Kafka Consumer Group Offset

Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups command.

  1. List the topics to which the group is subscribed
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe

Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.

  1. Reset the consumer offset for a topic (preview)
@gwillem
gwillem / ansible-bootstrap-ubuntu-16.04.yml
Created June 16, 2016 21:59
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# [email protected]
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
@remarkablemark
remarkablemark / README.md
Last active June 8, 2024 21:48
Classes - ES5 vs ES6

JavaScript Classes - ES5 vs ES6

An example that shows the difference between creating a JavaScript class and subclass in ES5 and ES6.

Reference

@roachhd
roachhd / README.md
Last active May 6, 2025 14:42
EMOJI cheatsheet ๐Ÿ˜›๐Ÿ˜ณ๐Ÿ˜—๐Ÿ˜“๐Ÿ™‰๐Ÿ˜ธ๐Ÿ™ˆ๐Ÿ™Š๐Ÿ˜ฝ๐Ÿ’€๐Ÿ’ข๐Ÿ’ฅโœจ๐Ÿ’๐Ÿ‘ซ๐Ÿ‘„๐Ÿ‘ƒ๐Ÿ‘€๐Ÿ‘›๐Ÿ‘›๐Ÿ—ผ๐Ÿ”ฎ๐Ÿ”ฎ๐ŸŽ„๐ŸŽ…๐Ÿ‘ป

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. โœˆ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: ๐Ÿ˜„

@9beach
9beach / ๊ธฐ์ˆ  ๋ฌธ์„œ๋ฅผ ์“ธ ๋•Œ ์ฃผ์˜ํ•ด์•ผ ํ•  ๋ช‡ ๊ฐ€์ง€.md
Last active November 16, 2024 06:51
๊ธฐ์ˆ  ๋ฌธ์„œ๋ฅผ ์“ธ ๋•Œ ์ฃผ์˜ํ•ด์•ผ ํ•  ๋ช‡ ๊ฐ€์ง€๋ฅผ ๋‚˜์—ดํ•ฉ๋‹ˆ๋‹ค.

๊ธฐ์ˆ  ๋ฌธ์„œ๋ฅผ ์“ธ ๋•Œ ์ฃผ์˜ํ•ด์•ผ ํ•  ๋ช‡ ๊ฐ€์ง€

๋…์ž ๋ฐฐ๋ ค

์ž์‹ ์˜ ์ƒ๊ฐ๊ณผ ํ•  ์ผ์„ ์ •๋ฆฌํ•˜๋Š” ๊ฒƒ์ด ๊ธฐ์ˆ  ๋ฌธ์„œ์˜ ๋ชฉํ‘œ๊ฐ€ ๋  ์ˆ˜๋Š” ์—†๋‹ค. ๋จผ์ € ๋…์ž๋ฅผ ์‹๋ณ„ํ•˜๋ผ. ๊ทธ๋ฆฌ๊ณ  ๋…์ž๋ฅผ ๋ฐฐ๋ คํ•˜๊ณ  ๋…์ž ์ž…์žฅ์„ ์ƒ๊ฐํ•˜๋ฉฐ ๋ฌธ์„œ๋ฅผ ์ž‘์„ฑํ•˜๋ผ.

ํ…์ŠคํŠธ ํŒŒ์ผ์˜ ์žฅ์ 

์ค‘์š”ํ•œ ์ •๋ณด๋ฅผ ์œ„ํ‚ค๋‚˜ ๊นƒ(Git)์—์„œ ํ…์ŠคํŠธ๋กœ ์ž‘์„ฑํ•˜์ง€ ์•Š๊ณ , ์›Œ๋“œ๋‚˜ ํŒŒ์›Œํฌ์ธํŠธ ๊ฐ™์€ ์ด์ง„ ๋ฌธ์„œ๋กœ ์ž‘์„ฑํ•  ๋•Œ๋งˆ๋‹ค ๋‹น์‹ ์˜ ๋™๋ฃŒ๋Š” ์ ‘๊ทผ์„ฑ, ๊ฐ€์‹œ์„ฑ, ๋ฒ„์ „ ๊ด€๋ฆฌ ๋“ฑ ๋‹ค์–‘ํ•œ ๋ฌธ์ œ๋กœ ๊ณ ์ƒํ•  ๊ฒƒ์ด๋‹ค.

@deiu
deiu / linkheaderparser.js
Last active July 25, 2019 11:34
Parse HTTP Link header in Javascript
// parse a Link header
//
// Link:<https://example.org/.meta>; rel=meta
//
// var r = parseLinkHeader(xhr.getResponseHeader('Link');
// r['meta'] outputs https://example.org/.meta
//
function parseLinkHeader(header) {
var linkexp = /<[^>]*>\s*(\s*;\s*[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g;
var paramexp = /[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g;
@rxaviers
rxaviers / gist:7360908
Last active May 12, 2025 15:50
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:
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream