Skip to content

Instantly share code, notes, and snippets.

View MadeOfMagicAndWires's full-sized avatar
🗑️
Making a mess of things

Joost Bremmer MadeOfMagicAndWires

🗑️
Making a mess of things
  • Amsterdam
View GitHub Profile
@abraithwaite
abraithwaite / chill-zoom.sh
Last active May 8, 2024 08:43
Zoom in Systemd Cgroups on Linux. Change the max allocations to fit your workstation.
#!/usr/bin/bash -xe
cat <<EOF > "${HOME}/.config/systemd/user/zoom.slice"
[Slice]
AllowedCPUs=0-4
MemoryHigh=6G
EOF
cat /usr/share/applications/Zoom.desktop | sed -E 's#^(Exec=).*$#Exec=/usr/bin/systemd-run --user --slice=zoom.slice /opt/zoom/ZoomLauncher#' > "${HOME}/.local/share/applications/Zoom.desktop"
  • SC1000 $ is not used specially and should therefore be escaped.
  • SC1001 This \o will be a regular 'o' in this context.
  • SC1003 Want to escape a single quote? echo 'This is how it'\''s done'.
  • SC1004 This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
  • SC1007 Remove space after = if trying to assign a value (or for empty string, use var='' ... ).
  • SC1008 This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
  • SC1009 The mentioned parser error was in ...
  • SC1010 Use semicolo
@Tmp341
Tmp341 / PublicTrackers.txt
Last active October 5, 2023 09:44
Public Trackers
http://[2001:1b10:1000:8101:0:242:ac11:2]:6969/announce
http://[2a00:b700:1::3:1dc]:8080/announce
http://[2a01:4f8:c012:8025::1]:8080/announce
http://[2a04:ac00:1:3dd8::1:2710]:2710/announce
http://1337.abcvg.info:80/announce
@khaeru
khaeru / toggl_import.py
Last active October 4, 2021 20:50
Toggl → Timewarrior import extension
#!/usr/bin/env python3
"""Toggl → Timewarrior import extension
© 2016 Paul Natsuo Kishimoto <mail@paul.kishimoto.name>
Licensed under the GNU GPL v3 or later.
Implements a Timewarrior extension (see
https://taskwarrior.org/docs/timewarrior/index.html) to import data from Toggl
(http://toggl.com).
@barijaona
barijaona / ._what.md
Created July 28, 2012 21:13 — forked from pnyheim/._what.md
Badass git pull alias (up) to show commit log that just got pulled in addition to changes

Badass git pull alternative

Add this in your path as git-up and git-reup (symbolic link) and it amps up your git pull by means of git up

  1. Adds in a list of the commits you're pulling down
  2. Auto-prunes remote branches
  3. Defaults to pull --rebase - gets rid of unnecessary merge commits. If you don't know what rebase does, this is probably safe for you. If you know what rebase does, you should know where this will not be safe for you.

Kyle Neath, Ryan Tomayko and then Zach Holman basically figured out how to do this. TheSpyder found a small error on case sensitive file systems.

@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a