Skip to content

Instantly share code, notes, and snippets.

View hanusek's full-sized avatar

Michał Hanusek hanusek

View GitHub Profile
@josemarcosrf
josemarcosrf / clean_disk.sh
Created January 14, 2021 19:28
Script to clean up and free disk space in Linux; Docker, Snap, cache, etc
#!/bin/bash
set -eu
set -o pipefail
say() {
echo "$@" | sed \
-e "s/\(\(@\(red\|green\|yellow\|blue\|magenta\|cyan\|white\|reset\|b\|u\)\)\+\)[[]\{2\}\(.*\)[]]\{2\}/\1\4@reset/g" \
-e "s/@red/$(tput setaf 1)/g" \
-e "s/@green/$(tput setaf 2)/g" \
@pdp7
pdp7 / config-pin beaglebone start up.md
Last active September 24, 2023 21:49
config-pin beaglebone start up

Create file /usr/bin/enable-i2c-pins.sh

  • sudo vi /usr/bin/enable-i2c-pins.sh
#!/bin/bash

config-pin p9.17 i2c
config-pin p9.18 i2c
  • sudo chmod 755 /usr/bin/enable-i2c-pins.sh
@tuxmartin
tuxmartin / README.md
Last active January 5, 2022 20:34
Minimal Poco websocket C++ client

Stazeni a kompilace POCO

wget http://pocoproject.org/releases/poco-1.7.3/poco-1.7.3.tar.gz
tar xzf poco-1.7.3.tar.gz
cd poco-1.7.3
./configure --minimal --static --no-samples --no-tests
time make -j4 -s
cd lib/Linux/x86_64/
for f in *.a; do "strip $f"; done