Skip to content

Instantly share code, notes, and snippets.

@SkaTeMasTer
SkaTeMasTer / log-rotate
Created February 13, 2017 08:51
Log rotate is important to keep the SD cards on Raspberry pi from corruption, disable any logging when possible (after debugging)
Logfile RoATING file operations using UNIX logrotate utility.
=============================================
+ Rotate the log file when file size reaches a specific size
+ Continue to write the log information to the newly created file after rotating the old log file
+ Compress the rotated log files
+ Specify compression option for the rotated log files
+ Rotate the old log files with the date in the filename
+ Execute custom shell scripts immediately after log rotation
+ Remove older rotated log files
@yangxuan8282
yangxuan8282 / emoji-info.sh
Last active January 24, 2025 18:39
Emoji❤bash
#!/bin/bash
# run this scripts with `bash emoji-info.sh` or `./emoji-info.sh`
usage() {
cat << EOF
usage: $0 [options] <emoji>
Options:
-h Show this message
-o Octal Escape Sequence
@wronk
wronk / python_environment_setup.md
Last active April 10, 2025 22:25
Setting up your python development environment (with pyenv, virtualenv, and virtualenvwrapper)

Overview of Python Virtual Environments

This guide is targetted at intermediate or expert users who want low-level control over their Python environments.

When you're working on multiple coding projects, you might want a couple different version of Python and/or modules installed. This helps keep each workflow in its own sandbox instead of trying to juggle multiple projects (each with different dependencies) on your system's version of Python. The guide here covers one way to handle multiple Python versions and Python environments on your own (i.e., without a package manager like conda). See the Using the workflow section to view the end result.


h/t @sharkinsspatial for linking me to the perfect cartoon

@mkubenka
mkubenka / sparsecheckout.yml
Created December 1, 2018 17:43
Ansible Sparse Checkout
---
- hosts: all
vars:
repo_url: ssh://[email protected]/user/repo.git
base_dir: /var/www
sparse_checkout:
- folder1