Skip to content

Instantly share code, notes, and snippets.

@atomlab
atomlab / vmware_fusion_player_13_download.md
Last active May 18, 2024 11:34
VMware Fusion Player 13 (Direct download link)

Direct download link (without registration)

2023-04-25 | 13.0.2 | 672.09 MB | dmg

wget https://download3.vmware.com/software/FUS-1302/VMware-Fusion-13.0.2-21581413_universal.dmg

sha256sum

c86b40823b97334f20b4e6b475b488ec23faf06c986e291965b9e56f7b44c042 VMware-Fusion-13.0.2-21581413_universal.dmg

@atomlab
atomlab / guacamole_rest_api_examples.md
Last active April 10, 2024 14:45
Guacamole REST API Examples

Get token

curl -X POST -d 'username=MYUSERNAME&password=MYPASSWORD' http://localhost:8080/guacamole/api/tokens

output

{
  "authToken": "C90FE11682EE3A8CCA339F1135FF02D0A97CDDDE440A970B559D005517BE6EA8",
  "username": "guacadmin",
@atomlab
atomlab / clean_prometheus_data.md
Last active February 18, 2024 08:56
Delete data from Prometheus

starting the server with the option

--web.enable-admin-api

Prometheus

# delete alerts series
curl -v -X POST -g 'http://localhost:9090/api/v2/admin/tsdb/delete_series?match[]=ALERTS'
@atomlab
atomlab / script-with-options.sh
Created August 19, 2023 05:27 — forked from dgoguerra/script-with-options.sh
Manual alternative to getopt in bash scripts, supporting short and long options
#!/usr/bin/env bash
# File name
readonly PROGNAME=$(basename $0)
# File name, without the extension
readonly PROGBASENAME=${PROGNAME%.*}
# File directory
readonly PROGDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# Arguments
readonly ARGS="$@"
@atomlab
atomlab / install_zsh.sh
Created June 16, 2023 10:44 — forked from ZhaofengWu/install_zsh.sh
Install zsh without root
#!/bin/bash
set -e
# zsh will not install without ncurses. If the machine doesn't have this library, it will need to be installed first.
export CXXFLAGS=" -fPIC" CFLAGS=" -fPIC" CPPFLAGS="-I${HOME}/include" LDFLAGS="-L${HOME}/lib"
wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.2.tar.gz
tar -xzvf ncurses-6.2.tar.gz
cd ncurses-6.2
./configure --prefix=$HOME --enable-shared
@atomlab
atomlab / wigeguard_setup.md
Last active March 12, 2022 22:03
Wireguard setup on Ubuntu 18.04

Wireguard setup on Ubuntu 16.04/18.04

Install

# sudo add-apt-repository ppa:wireguard/wireguard
# sudo apt-get update
# sudo apt-get install wireguard

Generate keys

#!//bin/bash
swappoff -a
echo "yes" | parted /dev/nvme0n1 rm 4
echo "yes" | parted /dev/nvme0n1 rm 3
echo "yes" | parted /dev/nvme1n1 rm 4
echo "yes" | parted /dev/nvme1n1 rm 3
@atomlab
atomlab / bash_strict_mode.md
Created September 4, 2021 18:57 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

set -e, -u, -x, -o pipefail

The set lines

  • These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
  • With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
  • set -euxo pipefail is short for:
set -e
set -u
@atomlab
atomlab / ferm.conf
Created January 28, 2021 17:53
Default ferm conf
def $TRUSTED = (
);
domain (ip) {
table filter {
chain INPUT {
policy DROP;
# connection tracking
mod state state INVALID DROP;
mod state state (ESTABLISHED RELATED) ACCEPT;