Skip to content

Instantly share code, notes, and snippets.

View stefan-huettemann's full-sized avatar
🎯
Focusing

Stefan Hüttemann stefan-huettemann

🎯
Focusing
View GitHub Profile
@stefan-huettemann
stefan-huettemann / CONFIGURE-OSX.sh
Created May 22, 2021 17:53
dogecoin configuration on OSX
# see Building-Dogecoin-1.14-for-Mac.md
echo "== Setting Berkeley and OpenSSL ENV Flags & Paths"
echo export LDFLAGS=-L/usr/local/BerkeleyDB.5.1/lib
export LDFLAGS=-L/usr/local/BerkeleyDB.5.1/lib
echo export CPPFLAGS=-I/usr/local/BerkeleyDB.5.1/include
export CPPFLAGS=-I/usr/local/BerkeleyDB.5.1/include
echo export INCPATHS=-I/usr/local/opt/openssl/include
export INCPATHS=-I/usr/local/opt/openssl/include
echo export LIBPATHS=-L/usr/local/opt/openssl/lib
@stefan-huettemann
stefan-huettemann / build.gradle
Created September 26, 2019 14:26
Some tasks to print properties on cmd line in gradle buildscripts
/**
* Print value of property provided in "-Pprop" on command line to stdout.
*
* Usage Example: ./gradlew -q printProperty -Pprop=rootProject.name
*/
task printProperty {
doLast {
// get the "property name" in question from commandline:
String prop = project.findProperty('prop')
if (prop == null) {
A random collection of power-shell commands - just to tease my memory
# remove old attachments to save disk space ...
Get-ChildItem –Path “E:\test” –Recurse | Where-Object CreationTime –lt (Get-Date).AddDays(-30) | Remove-Item –WhatIf
Get-ChildItem -Path "E:\test" -Recurse | Where-Object LastWriteTime -lt "2018-02-01" | Remove-Item –WhatIf
Get-ChildItem -Path "E:\test" -Recurse | Where-Object LastWriteTime -lt "2018-02-01" | Remove-Item
# list files
Get-ChildItem -Path "E:\test" -Recurse | Where-Object LastWriteTime -lt "2018-02-01"
@stefan-huettemann
stefan-huettemann / RestTemplate-Multipart.java
Last active February 6, 2024 21:19
Multipart Request using spring RestTemplate
protected ResponseEntity<Resource<List<Attachment>>> patchMultipartApiV1_Treatments_TID(final String aTID,
final Treatment aTreatment,
final boolean keepLock,
final MultipartFile... aMultipartFiles) throws IOException {
final MultiValueMap<String, Object> theMultipartRequest = new LinkedMultiValueMap<>();
// creating an HttpEntity for the JSON part:
final HttpHeaders theJsonHeader = new HttpHeaders();
theJsonHeader.setContentType(MediaType.APPLICATION_JSON);
@stefan-huettemann
stefan-huettemann / IntelliJ-Keymap-MacOS-DE.xml
Last active March 16, 2017 13:02
IntelliJ-Keymap-MacOS-DE
<!-- IntelliJ Keymap for MacOS DE / German Keyboard - Put this into ~/Library/Preferences/IntelliJIdea<your-version>/keymaps/<your-map-name>.xml -->
<keymap version="1" name="Mac OS X 10.5+ DE" parent="Mac OS X 10.5+">
<action id="Back">
<keyboard-shortcut first-keystroke="meta open_bracket" />
<keyboard-shortcut first-keystroke="meta alt left" />
<mouse-shortcut keystroke="button4" />
<keyboard-shortcut first-keystroke="meta u_with_diaeresis" />
</action>
<action id="CollapseAll">
<keyboard-shortcut first-keystroke="meta subtract" />
@stefan-huettemann
stefan-huettemann / ghostscript PDF A1b
Created February 23, 2017 18:51
Generate PDF A1b from PDF using Ghostscript
529 gs -dPDFA -dBATCH -dNOPAUSE -dUseCIEColor -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite -sPDFACompatibilityPolicy=1 -sOutputFile=output_filename.pdf 2016-12-14_Hufstedt_Beate_1974-11-17_patient.pdf