Skip to content

Instantly share code, notes, and snippets.

@Bihart
Bihart / xz.markdown
Created March 21, 2024 22:01 — forked from fabiomontefuscolo/xz.markdown
XZ and tricks

XZ

  1. Compress a file (filename.sql will be replaced by filename.sql.xz)
xz filename.sql
  1. Uncompress file (filename.sql.xz will be replaced by filename.sql)
@Bihart
Bihart / sed.txt
Created November 22, 2023 15:18 — forked from xydinesh/sed.txt
sed quick help guide
HANDY ONE-LINERS FOR SED (Unix stream editor) Oct. 29, 1997
compiled by Eric Pement <[email protected]> version 4.3
Latest version of this file is always at <http://www.wollery.demon.co.uk>
FILE SPACING:
# double space a file
sed G
# triple space a file
sed 'G;G'
@Bihart
Bihart / validate-sha256sum
Last active August 18, 2022 15:33 — forked from onnimonni/validate_sha256sum
Shell script to validate file sha256 hashes. I use this to check if downloaded binaries are correct.
#!/bin/sh
##
# This script contains helper for sha256 validating your downloads
#
# Source: https://gist.github.com/onnimonni/b49779ebc96216771a6be3de46449fa1
# Author: Onni Hakala
# License: MIT
##
# Stop program and give error message