Skip to content

Instantly share code, notes, and snippets.

@rambabusaravanan
rambabusaravanan / .gitconfig
Last active July 12, 2024 07:14
Git Diff and Merge Tool - IntelliJ IDEA
# Linux
# add the following to "~/.gitconfig" file
[merge]
tool = intellij
[mergetool "intellij"]
cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
trustExitCode = true
[diff]
@tcollins
tcollins / -Spring-JPA-Dynamic-Query-With-Limit
Last active February 22, 2024 10:21
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.
@robertcastle
robertcastle / CMVideoSamplingPatcher.cs
Created October 3, 2014 09:41
When using Xcode 6 and Unity 4.3.4 or earlier, iOS builds fail due to a missing include in CMVideoSampling.mm. This PostProcessBuild script adds the glext.h header to the CMVideoSampling.mm file if it is missing.
//-------------------------------------------------------------
//
// CMVideoSamplingPatcher
// Copyright © 2014 Egomotion Limited
//
// When using Xcode 6 and Unity 4.3.4 or earlier, iOS builds
// fail due to a missing include in CMVideoSampling.mm.
//
// This PostProcessBuild script adds the glext.h header
// to the CMVideoSampling.mm file if it is missing.
@zythum
zythum / gist:2848881
Created June 1, 2012 04:50
google收录的敏感词