Skip to content

Instantly share code, notes, and snippets.

View rickhohler's full-sized avatar

Rick Hohler rickhohler

View GitHub Profile

Zip all top level directories

find . -type d -maxdepth 1 -execdir zip -r {} {} \;
@rickhohler
rickhohler / gist:ad0f314acffef7087a3d18bcb8c4003c
Created January 29, 2020 01:21
Fix ‘add-apt-repository command not found’ Error on Ubuntu and Debian
sudo add-apt-repository ppa:some/ppa
In Debian, elementary OS and sometimes on Ubuntu, you’ll see the error that add-apt-repository command is missing.
sudo: add-apt-repository: command not found
sudo apt-get install software-properties-common
sudo apt-get update

GitHub Guide

Github Markdown Guides

Guide

Embed Link

![Description](path_to/file.png)
Rust Webassembly Build Error
Issue:
git:(master) ✗ rustc --version
rustc 1.36.0 (a53f9df32 2019-07-03)
git:(master) ✗ wasm-pack build
[INFO]: 🎯 Checking for the Wasm target...
[INFO]: 🌀 Compiling to Wasm...
Compiling proc-macro2 v1.0.7
@rickhohler
rickhohler / gist:927b6b428b96076ce05e46737eb23e72
Last active January 21, 2020 04:05
Remove empty directories with bash

Bash Fun with Files

# Remove all empty directories
find . -type d -empty -exec rmdir '{}' \;
# Remove all empty files
find . -type f -empty -exec rm '{}' \;