Skip to content

Instantly share code, notes, and snippets.

@microwave
microwave / jpa-cheatsheet.java
Created March 12, 2021 11:04 — forked from jahe/jpa-cheatsheet.java
JPA Cheatsheet
/*
JPA (Java Persistence API)
Transaction Management with an Entity-Mananger:
---
entityManager.getTransaction().begin();
entityManager.persist(<some-entity>);
entityManager.getTransaction().commit();
entityManager.clear();
@microwave
microwave / README.md
Created January 1, 2020 23:11 — forked from denji/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000
@microwave
microwave / Android 개발을 수주해서 Kotlin을 제대로 써봤더니 최고였다.md
Created September 25, 2017 02:20
Android 개발을 수주해서 Kotlin을 제대로 써봤더니 최고였다라는 글을 번역했습니다.

Android 개발을 수주해서 Kotlin을 제대로 써봤더니 최고였다.

글에 앞서

이 글은 일본의 omochimetaru님이 Qiita에 올린 Android 개발을 수주해서 Kotlin을 제대로 써봤더니 최고였다.라는 글을 번역해서 만들었습니다. 번역을 흔쾌히 허락해주신 omochimetaru님께 감사하다는 말씀 드립니다. 또한 글에서 한국에서는 쓰이지 않는 표현들 등에 대해서는 의역이 섞여있습니다. 이 점 양해 부탁드립니다. 늦은 시간까지 오역을 찾고 번역의 질을 높이는데 많은 도움을 주시고 오히려 저보다 많이 고생해주신 이상한모임의 pluulove님, chiyodad님, lemonade님께도 감사하다는 말씀 드립니다. 읽어주셔서 감사합니다.

Kotlin을 실무 프로젝트에서 사용했습니다.

며칠 전, 제가 소속된 Qoncept에서 "리얼 술래잡기"x후지큐 하이랜드 거대 유원지에서부터의 도주를 개발했고 출시했습니다.

@microwave
microwave / -Spring-JPA-Dynamic-Query-With-Limit
Created November 8, 2016 09:08 — forked from tcollins/-Spring-JPA-Dynamic-Query-With-Limit
Spring Data JPA - Limit results when using Specifications without an unnecessary count query being executed
If you use the findAll(Specification, Pageable) method, a count query is first executed and then the
data query is executed if the count returns a value greater than the offset.
For what I was doing I did not need pageable, but simply wanted to limit my results. This is easy
to do with static named queries and methodNameMagicGoodness queries, but from my research (googling
for a few hours) I couldn't find a way to do it with dynamic criteria queries using Specifications.
During my search I found two things that helped me to figure out how to just do it myself.
1.) A stackoverflow question.

git remote add gerrit ssh://account@IP:PORT

cat ~/.ssh/id_rsa.pub 후 gerrit user setting에 key 추가.

git status git diff resources

@microwave
microwave / gist:22f8500b37f91cf2ed4d
Last active July 25, 2016 07:30
Raspberry Pi에서 bluetooth 장치 사용하기
1.먼저 bluetooth를 사용하기 위한 소프트웨어를 설치한다.
sudo apt-get update
sudo apt-get install bluetooth bluez-utils blueman
lsusb로 USB에 연결된 bluetooth 동글이 잘 인식되는지 확인하고.
hcitool scan으로 검색된 블루투스 장비들을 확인한다.
이제 준비완료.
@microwave
microwave / Makefile
Created March 12, 2014 08:41 — forked from nzjrs/Makefile
all: test libtest.so testmodule
libtest.so: libtest.o
$(CC) -shared -o $@ $< -lc
test: test_main.c libtest.o
$(CC) -o $@ $?
testmodule: testmodule.c
python setup.py build