This document lists improvements over the default Linux command line tools.
The list was initially motivated by a blog post by Remy Sharp.
- bat - A replacement for
cat. - prettyping - Better
ping.
| #!/bin/sh | |
| # | |
| # for-each-subdir | |
| # =============== | |
| # | |
| # ## SYNOPSIS | |
| # | |
| # $ for-each-subdir [FLAGS] | |
| # | |
| # ## DESCRIPTION |
This document lists improvements over the default Linux command line tools.
The list was initially motivated by a blog post by Remy Sharp.
cat.ping.| function summarize-user { | |
| check_time=$(date +%Y-%m-%d -d "7 days ago") | |
| sacct -S $check_time -u $1 --format=User,Account,Jobname,elapsed,ncpus,AllocTRES | |
| } | |
| function modquota { | |
| echo sacctmgr -i modify account $1 set GrpTRES=gres/gpu=$2 GrpTRESMin=gres/gpu=$3; | |
| sacctmgr -i modify account $1 set GrpTRES=gres/gpu=$2 GrpTRESMin=gres/gpu=$3; | |
| } |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # All Vagrant configuration is done below. The "2" in Vagrant.configure | |
| # configures the configuration version (we support older styles for | |
| # backwards compatibility). Please don't change it unless you know what | |
| # you're doing. | |
| BOX_IMAGE = "ubuntu/xenial64" | |
| Vagrant.configure("2") do |config| | |
| # The most common configuration options are documented and commented below. |
When you are unable to login to the unifi controller or forgot admin password, you can restore access using SSH and manipulating mongodb directly.
Do not uninstall unifi controller - most of the data is not stored in mongodb. In case you thought a mongodb backup would be sufficient, you may have fucked up already, just like me. However I managed to write this "tutorial" for anyone to not run into the same trap.
Apparently this guide no longer works with recent unifi controller versions (starting nov/dec 2022). Since I no longer use unifi hardware in my home system, I can not update the guide myself. In case you've gotten here to recover your data, you're likely doomed. But giving it a try won't hurt anyway, therefore: good luck.
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
| #!/bin/sh | |
| # This gist has moved under github.com/hpcalex/slurmies/ as of 2020-12-30. | |
| # Usage: sacctmins <acct> <resc> | |
| # Reference for Slurm commands: | |
| # | |
| # https://slurm.schedmd.com/sshare.html |
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use Proc::Daemon; | |
| use Proc::PID::File; | |
| use Getopt::Long; | |
| use Log::Log4perl qw(:easy); | |
| use File::Basename; |
There are two metrics that are important to consider when discussing the size of Docker images.
The example commands shown below will work on Windows, MacOS, and Linux.