Skip to content

Instantly share code, notes, and snippets.

View shiv4289's full-sized avatar
💭
Grokking Apache Pulsar

Shivji Kumar Jha shiv4289

💭
Grokking Apache Pulsar
View GitHub Profile
### Upgrade Version in multi pom project
mvn versions:set -DnewVersion=2.50.1-SNAPSHOT
Revert:
mvn versions:revert
Commit
mvn versions:commit
[Ref](https://stackoverflow.com/questions/5726291/updating-version-numbers-of-modules-in-a-multi-module-maven-project)
@shiv4289
shiv4289 / postgres-brew.md
Created April 8, 2019 18:41 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update

Terminology

Bookies manage data in a log-structured way, which is implemented using three kind of files:

  1. Journal : A journal file contains the BookKeeper transaction logs. Before any update takes place, a bookie ensures that a transaction describing the update is written to non-volatile storage. A new journal file is created once the bookie starts or the older journal file reaches the journal file size threshold.
  2. Entry Log : An entry log file manages the written entries received from BookKeeper clients. Entries from different ledgers are aggregated and written sequentially, while their offsets are kept as pointers in LedgerCache for fast lookup. A new entry log file is created once the bookie starts or the older entry log file reaches the entry log size threshold. Old entry log files are removed by the Garbage Collector Thread once they are not associated with any active ledger.
  3. Index File : An index file is created for each ledger, which comprises a header and several fixed-length index pages,
/*
Reference : https://github.com/apache/flink/blob/master/flink-core/src/main/java/org/apache/flink/util/Preconditions.java
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at

Change remote URL

git remote set-url origin new.git.url/here Ref

Make local same as remote

git fetch origin git reset --hard origin/master Ref

Git generate patch for last commit

#!/usr/bin/env ruby
#
# Convert blogger (blogspot) posts to jekyll posts
#
# Basic Usage
# -----------
#
# ./blogger_to_jekyll.rb feed_url
#
# where `feed_url` can have the following format: