Skip to content

Instantly share code, notes, and snippets.

View kameit00's full-sized avatar
🏠
Working from home

Kai Mechel kameit00

🏠
Working from home
  • Germany/Göppingen
View GitHub Profile
@kameit00
kameit00 / intellij-shortcuts
Last active February 22, 2016 22:14
IntelliJ Shortcuts (Presentation IntelliJ IDEA - Tips and Tricks - Hadi Hariri)
Source: Presentation of Hadi Hariri (https://www.parleys.com/tutorial/intellij-idea-tips-tricks)
Set Keymap in Preferences to: Mac OS 10.5+
Recently opened Files --> ⌘E
Recently Edited Files --> ⇧⌘E
Hide views (e.g. Project) --> ⇧⎋ (⇧ escape-key)
In all Navigations, you can use Camel Case (e.g. FIS for FileInputStream)
@kameit00
kameit00 / convertPinboardTagsToLowerCase.groovy
Last active October 26, 2018 08:22
Renames all your Pinboard.in tags to lower case. My little groovy playground for today...
// Extend the String class with utility methods
String.metaClass.encodeURL = {
java.net.URLEncoder.encode(delegate as String, "UTF-8")
}
String.metaClass.isLowerCase = {
delegate.equals(delegate.toLowerCase())
}
def getTags(String uri) {
new XmlParser().parse(uri)
@kameit00
kameit00 / DreamboxDuplicateFinder.groovy
Last active December 9, 2015 22:48
Fast hack to find duplicate files on my dreambox. Files are named like ...DATE - CHANNEL - NAME.ts To find duplicates, only NAME should be compared.
import org.apache.commons.vfs2.VFS
import org.apache.commons.vfs2.provider.ftp.FtpFileObject
import java.util.regex.Pattern
def fsManager = VFS.manager
def movieDir = fsManager.resolveFile("ftp://root:dreambox@192.168.178.23/media/USB2.0Drive")
def set = new HashSet<String>()
movieDir.children.each { FtpFileObject item ->
if (item.name.toString().endsWith(".ts")) {