- create the plist file in
~/Library/LaunchAgents/com.squid-cache.org.daemon.plist
- create a local state directory
mkdir -p ${HOME}/.local/state/squid
brew install qemu vagrant | |
vagrant plugin install vagrant-qemu | |
vagrant init -m perk/debian-11-genericcloud-arm64 | |
vagrant up provider qemu | |
vagrant ssh |
no need to install the docker-desktop package
lima
with brew
brew install lima
mkdir -p ${HOME}/.lima/docker
Check here format and escaping in jq
https://jqlang.github.io/jq/manual/v1.5/#format-strings-and-escaping
system_profiler SPApplicationsDataType -json | jq -r '."SPApplicationsDataType" | .[] | [ ."_name",."version" ] | @tsv '
#!/bin/bash | |
set -e | |
# OSX is not a Linux! But bash works on both ;-) | |
if [ $(uname -s) != "Darwin" ]; then | |
echo "** I know you should run this on a Mac :) But it's a bash, so you can adapt it on your risk! **" | |
exit 1 | |
fi | |
# check if it's a git repo |
#!/bin/bash | |
do_hash(){ | |
[ -f shasum.txt ] && mv -fv shasum.txt shasum_$(date +%s).txt | |
shasum -a 256 * | tee -a shasum.txt && \ | |
awk '{print $1}' shasum.txt | sort | uniq > shasum_hash.txt | |
} | |
do_move(){ | |
[ -z "$1" -o $# -eq 0 ] && return 1 | |
SRC=$(pwd); DST=$1; | |
comm -23 ${SRC}/shasum_hash.txt ${DST}/shasum_hash.txt | while read hash; do FILE=$(grep ^$hash ${SRC}/shasum.txt | awk '{print $2}'|head -1); [ ! -f ${SRC}/$FILE ] && continue; mv -v ${SRC}/$FILE ${DST}/new-$(echo $hash | head -c12).${FILE#*.} && sed -I_bak "/^$hash/d" ${SRC}/shasum.txt; done |
docker run -it --rm golang:1.17 bash -c "go install github.com/bitnami/[email protected] &> /dev/null && echo -n secret | bcrypt-cli" |