Skip to content

Commit

Permalink
Update posts
Browse files Browse the repository at this point in the history
  • Loading branch information
renegrob committed Nov 13, 2023
1 parent 37cee4d commit 98dfadb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 0 additions & 1 deletion content/posts/curl-show-headers.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
+++
title = 'How to see HTTP headers and raw output during debugging with cURL'
date = 2022-07-19T20:27:04+01:00
draft = true
+++
When debugging, it is often helpful to see the returned HTTP headers and the raw output of a curl request. This can be done using the following command:
```
Expand Down
13 changes: 9 additions & 4 deletions content/posts/gradle-wrapper.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
+++
title = 'Call Gradle Wrapper from nested Directory'
date = 2021-10-29T20:24:48+01:00
draft = true
+++

Save this script as `gw`, make it executable and put it to the search path:
The following script will allow you to use `gw` instead of `./gradlew` in any subdirectory. `gw` will go up the directory hierarchy until it finds `gradlew` or a gradle settings file.
<!--more-->

Save this script as `gw`, make it executable and add it to the search path:

```
#!/bin/bash
relative_path='.'
while [[ $(realpath $relative_path) != '/' ]]; do
#echo $(realpath $relative_path)
if [[ -f "${relative_path}/gradlew" ]]; then
#echo "Found gradlew at ${relative_path}"
# Found gradlew, execute it.
${relative_path}/gradlew "$@"
break
fi
# Check for Gradle settings files.
if [[ -f "${relative_path}/settings.gradle" || -f "${relative_path}/settings.kts" || -f "${relative_path}/settings.gradle.kts" ]]; then
# Found a Gradle settings file, stop searching.
break
fi
# Move up one directory.
relative_path="${relative_path}/.."
done
```

This will allow you to use `gw` instead of `./gradlew` in any subdirectory. `gw` will search up until it finds `gradlew` or a gradle settings file.

0 comments on commit 98dfadb

Please sign in to comment.