Skip to content

Instantly share code, notes, and snippets.

Noyabronok /
Created June 4, 2024 22:41 — forked from drmalex07/
Convert properties to JSON using jq. #properties $json #jq


Say we have a properties file at

First, clean-up whitespace and empty lines, store in

cat | \
    sed 's/[[:space:]]*=[[:space:]]*/=/' | \
    sed 's/[[:space:]]*$//' | \

sed '/^$/d' >

Noyabronok / bad-self-closing-tags-regex
Last active July 28, 2023 19:24
Improper Self closing tags regex vscode
Noyabronok / disable-address1-only.html
Created January 29, 2018 22:32
example of form where chrome autofill works for all fields except address1
<!DOCTYPE html>
<title>Some Site</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<p>Some other website</p>
<form id="test-form" action="#" autocomplete="disabled">
First Name: <input type="text" name="fname" id="fname-id" autocomplete="given-name"><br/>
Last Name: <input type="text" name="lname" id="lname-id" autocomplete="family-name"><br/>
Noyabronok / gist:15f93580601917c1b8c0937233068c30
Created September 21, 2017 16:59
github expand outdated comments
Noyabronok /
Last active January 9, 2018 22:07
JDK switching
#list available jdks
alias jdks="/usr/libexec/java_home -V"
# jdk version switching - e.g. `jdk 6` will switch to version 1.6
function jdk() {
echo "Switching java version";
export JAVA_HOME=`/usr/libexec/java_home -v 1.$1`;
java -version;
export PATH=\$JAVA_HOME/jre/bin:$PATH