Skip to content

Instantly share code, notes, and snippets.

@atomlab
atomlab / vmware_fusion_player_13_download.md
Last active October 6, 2023 18:06
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 / 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
#!//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;
@atomlab
atomlab / docker_install.md
Last active January 15, 2021 09:31
Docker install

Docker install

Docker

curl -fsSL https://get.docker.com -o get-docker.sh
sh ./get-docker.sh

Docker-compose

@atomlab
atomlab / test.js
Last active January 7, 2021 21:32
// Switch current database to "history"
db = db.getSiblingDB('history');
// The mark for cutting initial output off
print("CUT_TO_HERE");
rs.slaveOk();
// Main output
// "toArray()" method allows to get all records
printjson( db.getCollection('LastWeekRates').find({coin: {$in:["AE", "ADA", "ARK", "BCD", "BCH", "BNB", "BSV", "BTC", "BTG", "DCR", "DGB", "EOS", "ETC", "ETH", "GAS", "GRS", "ICX", "KIN", "LTC", "NEO", "ONG", "ONT", "RVN", "TRX", "BTT","TRX-USDT", "WIN", "JST", "XLM", "XRP"]}, fiat: 'USD'}).toArray());

Baking on Tezos

This document describes how to setup a Tezos node and delegate baking rights to it. It involves configuring two instances:

  • Node: Public vps instance that interacts with the tezos network and runs tezos-node, tezos-baker, tezos-endorser and tezos-accuser.
  • Signer: Private instance on your home network that contains the baker keys and authorizes baking requests via tezos-signer.

Prep Instances

This guide assumes you have already created two instances running Ubuntu 18.04.