Skip to content

Instantly share code, notes, and snippets.

View eliroca's full-sized avatar

Elisei Roca eliroca

  • Germany
  • 00:34 (UTC +02:00)
View GitHub Profile
@s-leon
s-leon / up
Last active May 2, 2024 11:56
oS TW update script
#!/bin/bash
sudo -s <<EOF
zypper dup -l -y --no-recommends --allow-downgrade --allow-arch-change --force-resolution
flatpak update -y --noninteractive --force-remove
flatpak remove --unused --delete-data -y
#flatpak repair
journalctl --rotate
journalctl --vacuum-time=2d
zypper clean
rm -rfv /var/tmp/flatpak-cache-*
@m-rey
m-rey / blacklist_pcspkr.sh
Last active July 30, 2020 21:15
removes annoying beeps from pc speaker on openSUSE
sudo modprobe -r pcspkr
echo "blacklist pcspkr" | sudo tee /etc/modprobe.d/nobeep.conf > /dev/null
@m-rey
m-rey / persistent_irc.txt
Last active May 11, 2021 03:01
Guide to setup irc with tmux on a server as a pseudo bouncer.
initial setup:
1. ssh into your server and create a new tmux session called irc:
$> ssh -t $user@$server tmux new -A -s irc
2. Run an irc client of your choice like irssi or weechat:
$> weechat
3. Configure the client to your liking.
@tomschr
tomschr / task-templ.py
Created December 3, 2018 07:45
Template for Python Course
#!/usr/bin/env python3
"""
task is a small command line utility to create, list, remove, and edit tasks.
"""
# TODOS/TASKS:
# - add the code
import argparse
import datetime
@tomschr
tomschr / example-cli-argparse.py
Last active April 21, 2024 08:13
Template for an example CLI program with argparse, docopts and logging
#!/usr/bin/env python3
import argparse
import logging
from logging.config import dictConfig
import sys
__version__ = "0.2.0"
__author__ = "Tux Penguin <tux@example.net>"
@mgoellnitz
mgoellnitz / snip.sh
Last active January 4, 2024 17:57
GitLab Snippet Command Line Tool
#!/bin/bash
#
# Copyright 2016-2021 Martin Goellnitz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 24, 2024 17:56
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@joaopizani
joaopizani / .screenrc
Created May 17, 2012 11:55
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off