Skip to content

Instantly share code, notes, and snippets.

🎯
stupid-feature-here

Selçuk Karakayalı karakays

🎯
stupid-feature-here
Block or report user

Report or block karakays

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@karakays
karakays / mvn.md
Last active Mar 25, 2020
mvn clean install and we're done
View mvn.md

http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
https://maven.apache.org/guides/mini/guide-configuring-plugins.html#

phase vs. plug-in vs. goal

A lifecycle consists of different phases, e.g. compile, test, integration-test, deploy etc. Each phase is executed via several plug-ins. A plug-in may have many goals of which each is bound to a default (or custom) phase.
Different goals of the same plug-in can be bound to different phases, e.g.

<execution>
 <id>flatten</id>
View gpg.md

GNU Privacy Guard

remove private master key from keyring

gpg --list-secret-keys --with-keygrip
gpg-connect-agent "DELETE_KEY <master-grip>" /bye

export secret subkeys only to port

@karakays
karakays / vim.md
Last active Feb 16, 2020
vim cheat sheet
View vim.md
  • display EOL chars (\r\n)
$ vim -b
:e ++ff=unix
  • paste from register in insert
:<C-r>a
:<C-r>*    " from clipboard
View kafka-clients.md

produce message from file

$ echo 2,$(cat message) | bin/kafka-console-producer.sh --broker-list localhost:9092 \   
  --topic frankfurters --property parse.key=true --property key.separator=,

delete records

$ bin/kafka-delete-records.sh --bootstrap-server localhost:9092 --offset-json-file share/offset.json
View bash.md

My favorite bash commands

ls

  • follow symlinks (file or directory)
    ls -L winhome/

tr

  • translate, delete or squeeze characters
    tr [char1] [char2]
@karakays
karakays / mercurial.md
Last active Jul 5, 2019
Mercurial cheatsheet
View mercurial.md

basic flow

hg add a b
hg commit a -m "added a" # commit specific file
hg push

discard local changes

hg revert file # revert file
hg revert --all

log recent commits

@karakays
karakays / openssl.md
Last active Apr 8, 2019
Common OpenSSL commands
View openssl.md

Generate a new private key and Certificate Signing Request

openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key

Generate a self-signed certificate (see How to Create and Install an Apache Self Signed Certificate for more info)

openssl req -x509 -sha256 -nodes -days 365 \
-newkey rsa:2048 -keyout privateKey.key \
-out certificate.crt
@karakays
karakays / git.md
Last active Mar 19, 2020
my git cheatsheet
View git.md

Troublesome cases in git

Undoing git rm

$ git status
Changes to be committed:     
  deleted:    file

Unstage file

@karakays
karakays / tmux.md
Created Jan 4, 2019 — forked from andreyvit/tmux.md
tmux cheatsheet
View tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
View keybase.md

Keybase proof

I hereby claim:

  • I am karakays on github.
  • I am karakays (https://keybase.io/karakays) on keybase.
  • I have a public key whose fingerprint is E173 7ECB 4384 D56A 694B E02F 0B7D 8235 0CE9 E2A6

To claim this, I am signing this object:

You can’t perform that action at this time.