Skip to content

Instantly share code, notes, and snippets.

View TomyJaya's full-sized avatar

Tomy Jaya TomyJaya

View GitHub Profile
@TomyJaya
TomyJaya / spring-data-rest-notes.md
Last active June 5, 2024 17:03
Spring Data REST - Useful notes

How To change baseUri:

in application.properties add:

spring.data.rest.basePath=/api
  • or -

in application.yml add:

@TomyJaya
TomyJaya / logger-snippets.md
Last active February 6, 2018 14:16
Logger snippets

SLF4J

Java

import org.slf4j.LoggerFactory;
import org.slf4j.Logger;

// ...

private static final Logger LOG = LoggerFactory.getLogger(HelloWorld.class);
@TomyJaya
TomyJaya / archival-and-compression-cheatsheet.md
Last active February 11, 2016 15:55
Cheatsheet to working with unix archival and compression

.tar vs .gz vs .zip

  • .tar: archiving (putting files together into 1 folder) in Unix
  • .gz: compression in Unix
  • .tar.gz: archiving + compression in Unix
  • .zip: archiving + compression in Windows

Archiving as .tar

To compress a directory:

@TomyJaya
TomyJaya / git-cheatsheet.md
Last active June 4, 2021 13:49
git-cheatsheet

Cherry Pick

Cherry pick based on a commit by ignoring spaces

HINT: To avoid conflicts, cherry pick with the same order of the original commits (i.e. use Unix tac command to reverse sort the git log)

git cherry-pick -X ignore-all-space <commit_hash>

e.g.