Skip to content

Instantly share code, notes, and snippets.

View arbal's full-sized avatar
👌
new Adaptor(this); // new Adaptor(_humans[].Behavior);

Arbal arbal

👌
new Adaptor(this); // new Adaptor(_humans[].Behavior);
  • Los Angeles, CA
  • 00:06 (UTC -07:00)
View GitHub Profile
@arbal
arbal / popclip-chatgpt.js
Created February 5, 2024 23:35 — forked from alanzchen/popclip-chatgpt.js
PopClip Actions using ChatGPT.
// #popclip extension for ChatGPT
// name: ChatGPT Quick Actions
// icon: iconify:logos:openai-icon
// language: javascript
// module: true
// entitlements: [network]
// options: [{
// identifier: apikey, label: API Key, type: string,
// description: 'Obtain API key from https://platform.openai.com/account/api-keys'
// }]
@arbal
arbal / XDG.cheat-sheet.md
Created January 30, 2024 17:07 — forked from roalcantara/XDG.cheat-sheet.md
XDG cheat sheet

XDG - Base Directory Specification

Directories

Base

The intended use-case for BaseDirectories is to query the paths of user-invisible standard directories that have been defined according to the conventions of the operating system the library is running on.

@arbal
arbal / serversetup.md
Created January 26, 2024 16:50 — forked from Markus92/serversetup.md
Setting up a GPU server with scheduling and containers

Setting up a GPU server with scheduling and containers

Our group recently acquired a new server to do some deep learning: a SuperMicro 4029GP-TRT2, stuffed with 8x NVidia RTX 2080 Ti. Though maybe a bit overpowered, with upcoming networks like BigGAN and fully 3D networks, as well as students joining our group, this machine will be used quite a lot in the future.

One challenge is, is how to manage these GPUs. There are many approaches, but given that most PhD candidates aren't sysadmins, these range from 'free-for-all', leading to one person hogging all GPUs for weeks due to a bug in the code, to Excel sheets that noone understands and noone adheres to because changing GPU ids in code is hard. This leads to a lot of frustration, low productivity and under-utilisation of these expensive servers. Another issue is conflicting software versions. TensorFlow and Keras, for example, tend to do breaking API changes every now and then. As t

Mount Volumes into Proxmox VMs with Virtio-fs

Part of collection: Hyper-converged Homelab with Proxmox

Virtio-fs is a shared file system that lets virtual machines access a directory tree on the host. Unlike existing approaches, it is designed to offer local file system semantics and performance. The new virtiofsd-rs Rust daemon Proxmox 8 uses, is receiving the most attention for new feature development.

Performance is very good (while testing, almost the same as on the Proxmox host)

VM Migration is not possible yet, but it's being worked on!

@arbal
arbal / job_control_zsh_bash.md
Created October 27, 2023 20:38 — forked from CMCDragonkai/job_control_zsh_bash.md
CLI: Job Control in ZSH and Bash

Job Control in ZSH and Bash

All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.

# run command in the foreground
command
# run commend in the background
@arbal
arbal / skeleton-daemon.sh
Created October 6, 2023 07:49 — forked from shawnrice/skeleton-daemon.sh
A template to write a quick daemon as a bash script
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"
@arbal
arbal / install_node.sh
Created October 5, 2023 16:39
Install node
#!/usr/bin/env bash
set -euo pipefail
# confirm the version of Ubuntu is supported
lsb_release -a
# should show Ubuntu version 20 or higher
# Update APT
sudo apt-get update
@arbal
arbal / retry.sh
Created September 18, 2023 15:32 — forked from reacocard/retry.sh
Bash retry function with exponential backoff.
#!/usr/bin/env bash
# This software is freely available under the Apache 2.0 license.
# Full license available here: https://www.apache.org/licenses/LICENSE-2.0.txt
set -o errexit
set -o nounset
set -o pipefail
# Retry a command on a particular exit code, up to a max number of attempts,
#!/bin/sh
# /etc/config/show_wifi_clients.sh
# Shows MAC, IP address and any hostname info for all connected wifi devices
# written for openwrt 12.09 Attitude Adjustment
echo "# All connected wifi devices, with IP address,"
echo "# hostname (if available), and MAC address."
echo -e "# IP address\tname\tMAC address"
@arbal
arbal / show_wifi_clients.sh
Created September 6, 2023 21:07 — forked from c4mx/show_wifi_clients.sh
OpenWrt show connected clients
#!/bin/sh
# show_wifi_clients.sh
# Shows MAC, IP address and any hostname info for all connected wifi devices
# modification based on https://openwrt.org/faq/how_to_get_a_list_of_connected_clients
echo "# All connected wifi devices, with IP address,"
echo "# hostname (if available), and MAC address."
printf "%-15s %-15s %15s\n" "IP address" "Host" "MAC"