Skip to content

Instantly share code, notes, and snippets.

@sergeiwaigant
sergeiwaigant / url_encode_string_with_linux_tools.md
Last active April 24, 2025 21:35
Simply URL encode string with Linux/Bash/Shell tools

Reference https://stackoverflow.com/a/34407620/13287790

$ printf %s 'encode this'|jq -sRr @uri
encode%20this

$ jq -rn --arg x 'encode this' '$x|@uri'
encode%20this

# -r (--raw-output) outputs the raw contents of strings instead of JSON string literals. -n (--null-input) doesn't read input from STDIN.
@jozsefsallai
jozsefsallai / GoHTML.sublime-syntax
Last active March 11, 2025 12:41
Go HTML template syntax highlighting for Sublime Text
%YAML 1.2
---
name: 'GoHTML'
file_extensions:
- gohtml
- html.go
scope: text.html.gohtml
contexts:
main:
- match: ''