Skip to content

Instantly share code, notes, and snippets.

@jirkafm
jirkafm / gist:e75fc12705231f154d442b8cecdc4841
Created February 24, 2021 06:42
Batch renaming with find and mv
# Replace any file with suffix '*IntegrationTest.java' to a same file with '*IT.java' suffix.
find . -type f -name '*IntegrationTest.java' -exec sh -c 'x="{}"; mv "$x" "${x%"IntegrationTest.java"}IT.java"' \;
@jirkafm
jirkafm / gist:b40c7d227c808199ab56b521d5bcd5b2
Created February 10, 2021 13:00
Clone all repos from github organization ( taken from https://gist.github.com/caniszczyk/3856584 )
curl -s https://api.github.com/orgs/<ORG_NAME>/repos\?per_page\=100 | jq '.[].html_url' | xargs -n 1 git clone
@jirkafm
jirkafm / gist:f699e657469fc6648f8ec9daaef711f2
Created August 10, 2020 08:38
H2 - get all table names from current schema (Spring JPA)
final Query query = testEntityManager.getEntityManager()
.createNativeQuery("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = SCHEMA()");
final List result = query.getResultList();
@jirkafm
jirkafm / settings.json
Created June 25, 2020 13:17
VSCodeVim extension for VS Code remap some vim CTRL function to be handled directly by VS Code
"vim.handleKeys": {
"<C-w>": false,
"<C-x>": false,
"<C-c>": false,
"<C-v>": false
}
@jirkafm
jirkafm / win-env-setup.ps1
Last active April 29, 2020 14:53
Setup Windows development machine through powershell with choco
# Prerequisite:
# Run powershell with admin privileges
$file = 'win-env.ps1'
(New-Object System.Net.WebClient).DownloadFile('https://raw.githubusercontent.com/jirkafm/my-env/master/win/win-env.ps1', $file)
Set-ExecutionPolicy Bypass -Scope Process -Force;
iex "./$file all"
@jirkafm
jirkafm / 10_intel_ brightness
Last active March 28, 2020 17:53
Intel backlight linux suspend script for systemd (source: http://tiny.cc/intel_backlight )
#!/bin/bash
# Author xortim, jirkafm
# Description Workaround for intel backlight brightness quirk.
# Script should be put into /usr/lib/systemd/system-sleep
case "${1}" in
post)
echo 1 > /sys/class/backlight/intel_backlight/brightness
cat /tmp/pre_suspend_brt > /sys/class/backlight/intel_backlight/brightness
;;
diff --git a/com.diffplug.rcpdemo/rcpdemo.product b/com.diffplug.rcpdemo/rcpdemo.product
index d04163a..6403dd2 100644
--- a/com.diffplug.rcpdemo/rcpdemo.product
+++ b/com.diffplug.rcpdemo/rcpdemo.product
@@ -39,55 +39,40 @@
<plugin id="com.diffplug.rcpdemo"/>
<plugin id="com.diffplug.talks.rxjava_and_swt"/>
<plugin id="com.google.guava"/>
- <plugin id="io.reactivex.rxjava"/>
<plugin id="javax.inject"/>
@jirkafm
jirkafm / gist:2479047c6f79d0b2c17c3df2503e8211
Created March 24, 2018 11:38
gradle-and-eclipse-rcp-differences
diff --git a/gradle.properties b/gradle.properties
index ac24286..eec74b2 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -7,12 +7,12 @@ org=diffplug
# Build requirements
VER_JAVA=1.8
-VER_GOOMPH=3.8.0
+VER_GOOMPH=3.13.0