Skip to content

Instantly share code, notes, and snippets.

View coseos's full-sized avatar
🏢
Working

coseos coseos

🏢
Working
View GitHub Profile
@coseos
coseos / DX.bin
Last active November 4, 2022 09:00
Patched
{"timestamp": "2022-11-04T09-00-01_00-00", "state": "U2FsdGVkX1+AyIV8Mkc/W/uc3THqGxYRDVfu0XJwtEA="}
@coseos
coseos / iot-pyj-001
Last active August 19, 2022 16:35
PyPatched
{}

Linux crontab shortcuts

With cron, you can use some shortcuts that let you see when an entry is triggered without remembering the more difficult numbers that you would have to put there:

Synonym        Meaning and equivalent crontab values
-----------    ---------------------------------------------------
@reboot        Run once, at startup (only works with this synonym)
@yearly        Run once a year, equals "0 0 1 1 *".
@annually (same as @yearly)

Docker on Raspberry Pi 4

It's so simply to use Docker on the Raspberry Pi. All you have to do is:

sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install docker.io

sudo usermod -aG docker pi

sudo systemctl reboot
@coseos
coseos / Razer-Book-13_with_Debian-Bullseye_Fix-Audio-problem.md
Created June 6, 2022 12:37
Razer Book 13 with Debian Bullseye Fix Audio problem

Razer Book 13 with Debian Bullseye: Fix Audio Problem

The Razer Book 13 is my second Razer notebook. The fine silver makes a nice difference to the beautiful black of the Stealh 13. Even though the technical specs leave some wishes open as 16 GB of RAM is the max, the look and touch is great. In my opinion this is the most beautiful non black notebook available in 2022.

Razor Book 13

Audio may not work out of the box though when you install Debian Bullseye (11) on your Razor Book 13.

When your output lists only the Dummy-device, fix that with the following command (run as root):

@coseos
coseos / colorprompt
Created May 27, 2022 06:27
Colorprompt provides a prompt with color
# colorprompt a prompt with color
function colorprompt() {
bo="\[\033[01;38;5;247m\]["
bc="\[\033[01;38;5;247m\]]"
u1="\[\033[01;38;5;196m\]${USER:0:1}"
u2="\[\033[01;38;5;009m\]${USER:1:1}"
u3="\[\033[01;38;5;202m\]${USER:2:1}"
u4="\[\033[01;38;5;208m\]${USER:3:1}"
u5="\[\033[01;38;5;214m\]${USER:4:1}"
This file has been truncated, but you can view the full file.
{ 'timestamp': '21/07/2022 21:19:52', 'state': '_' }
{ 'timestamp': '21/07/2022 21:24:08', 'state': '_' }
{ 'timestamp': '21/07/2022 21:28:23', 'state': '_' }
{ 'timestamp': '21/07/2022 21:32:37', 'state': '_' }
{ 'timestamp': '21/07/2022 21:36:52', 'state': '_' }
{ 'timestamp': '21/07/2022 21:41:07', 'state': '_' }
{ 'timestamp': '21/07/2022 21:45:22', 'state': '_' }
{ 'timestamp': '21/07/2022 21:49:37', 'state': '_' }
{ 'timestamp': '21/07/2022 21:53:54', 'state': '_' }

How to use dwm on a Raspberry Pi with RaspiOS

RaspiOS based on Debian Bullseye

Prepare

You should install RaspiOS from the official image or have your Raspberry Pi ready. Sorry, no details for that. There are lot's of helpful resources available.

Increase NetBeans fontsize

To increase the fontsize with NetBeans 13, add a --fontsize parameter followed by an integer that specifies the fontsize.

netbeans --fontsize 20
@coseos
coseos / eclipse.desktop
Created January 21, 2022 14:53
Gnome Desktop Launcher for eclipse
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=${HOME}/Bin/eclipse/eclipse
Name=eclipse
Comment=eclipse
Icon=${HOME}/Bin/eclipse/icon.xpm