Skip to content

Instantly share code, notes, and snippets.

@sts10
sts10 / rust-command-line-utilities.markdown
Last active March 28, 2024 08:47
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@Titiaiev
Titiaiev / bash-guide-1.md
Last active March 28, 2024 08:46
шпаргалка по написанию bash скриптов, по ссылке - оригинальная статья на хабре

Бесплатная книга-сайт на русском, полный гайд
Advanced Bash-Scripting Guide

Введение

BASH — Bourne-Again SHell (что может переводится как «перерожденный шел», или «Снова шел Борна(создатель sh)»), самый популярный командный интерпретатор в юниксоподобных системах, в особенности в GNU/Linux. Ниже приведу ряд встроенных команд, которые мы будем использовать для создания своих скриптов.

>break выход из цикла for, while или until

@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 08:45
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@mrpeardotnet
mrpeardotnet / PVE-host-backup.md
Created December 17, 2019 18:03
Proxmox PVE Host Config Backup Script

Proxmox PVE Host Config Backup Script

This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.

The script will create backups using tar with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.

Create backup script file

To create backup script that will be executed every day we can create backup script in /etc/cron.daily/ folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:

touch /etc/cron.daily/pvehost-backup
@danielv99
danielv99 / l2tpclient.sh
Last active March 28, 2024 08:45
L2TP VPN client on Linux Debian
# Requirements
# debian/ubuntu
apt-get -y update && apt-get -y upgrade
apt-get -y install strongswan xl2tpd libstrongswan-standard-plugins libstrongswan-extra-plugins
VPN_SERVER_IP=''
VPN_IPSEC_PSK='y'
VPN_USER=''
VPN_PASSWORD=''
@dsample
dsample / README.md
Last active March 28, 2024 08:43
ASCII art diagrams

ASCI art characters for creating diagrams

Characters:

Single line

  • ASCII code 191 = ┐ ( Box drawing character single line upper right corner )
  • ASCII code 192 = └ ( Box drawing character single line lower left corner )
  • ASCII code 193 = ┴ ( Box drawing character single line horizontal and up )
  • ASCII code 194 = ┬ ( Box drawing character single line horizontal down )
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@bbqtd
bbqtd / macos-tmux-256color.md
Last active March 28, 2024 08:40
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

@abobija
abobija / esp-idf-on-wsl2.md
Last active March 28, 2024 08:40
ESP-IDF on WSL2 - Build, Flash and Monitor

ESP-IDF on WSL2 - Build, Flash and Monitor ⚡

Demo

How to setup ESP-IDF on WSL2 Ubuntu 20.04 - Config, Build and Flash

Intro

WSL2 still does not support USB devices, but with a little effort we can make possible to flash and monitor ESP device from WSL2.