Skip to content

Instantly share code, notes, and snippets.

View bernd's full-sized avatar

Bernd Ahlers bernd

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"
#!/bin/sh
GITHUB_USER=dennisoelkers
if [ "$1" != "" ]; then
GITHUB_USER=$1
fi
echo "PRs asking me for review:\n"
for i in `hub pr list -s open -o update -f '%i;%sH;%H;%U;%ut;%rs%n'|sed 's/ //g'|grep ${GITHUB_USER}`; do
#!/bin/sh
# Returning the status of all open PRs of $1, execute it in the directory of the git repository
# Perfect in combination with `watch -n 30 -c pr-check`
GITHUB_USER=dennisoelkers
if [ "$1" != "" ]; then
GITHUB_USER=$1
fi
@coolaj86
coolaj86 / Bootable Mac ISO with Linux.md
Last active May 12, 2024 19:57
Create Bootable MacOS ISO from Apple's Free PKG
@spinscale
spinscale / Webserver.java
Created June 10, 2015 07:01
Undertow + jgroups-raft example
package de.spinscale.cluster;
import io.undertow.Undertow;
import io.undertow.server.handlers.PathTemplateHandler;
import io.undertow.util.HttpString;
import io.undertow.util.PathTemplateMatch;
import org.jgroups.JChannel;
import org.jgroups.raft.RaftHandle;
import org.jgroups.raft.blocks.ReplicatedStateMachine;
@bernd
bernd / gist:b291794b6d2f6a8b8eba
Created August 1, 2014 13:30
Compare deb and rpm versions
@beddari
beddari / gist:9363794
Last active August 29, 2015 13:57
omnibus packaging workflow for gems

A workflow for packaging gems using fpm-cookery?

Given a gem with a specific version in recipe.rb:

If building "head" or "devel"

  1. Ignore the $version specified in recipe.rb
  2. Fetch and install the latest gem and deps using the "omnibus" ruby
  3. Derive the $version
@mlafeldt
mlafeldt / Usage.md
Last active November 24, 2015 21:25
Vagrant + fpm-cookery

Boot up the Vagrant virtual machine:

$ vagrant up

Build a specific recipe with fpm-cookery:

$ RECIPE=<recipe-name> vagrant provision

The final packages will be located here:

@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results