Skip to content

Instantly share code, notes, and snippets.

View arseto's full-sized avatar

Arseto Nugroho arseto

View GitHub Profile
@arseto
arseto / jpaNativeQuerySample.kt
Last active October 1, 2022 07:45
JPA Native Query with Kotlin and Spring
@Service
class SalesOrderServiceImpl @Autowired constructor (
val em: EntityManager
) : SalesOrderService {
override fun getDailySalesData(reportFilter: ReportFilter)
: List<SalesData> {
val q = em.createNativeQuery("""
SELECT
s.date,
@arseto
arseto / tlpnotcharging.txt
Created August 15, 2017 04:19
TLP not charging with thinkpad X230 and docking connector
--- TLP 1.0 --------------------------------------------
+++ Configured Settings: /etc/default/tlp
TLP_ENABLE=1
TLP_DEFAULT_MODE=AC
TLP_PERSISTENT_DEFAULT=0
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=2
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60
@arseto
arseto / .vimrc
Last active May 3, 2018 02:59
Use `ag` over `grep` for ctrlp.vim
" source: https://stackoverflow.com/questions/2372307/opening-files-in-vim-using-fuzzy-search
if executable('ag')
" Use Ag over Grep
set grepprg=ag\ --nogroup\ --nocolor
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
endif