Skip to content

Instantly share code, notes, and snippets.

View tpopela's full-sized avatar

Tomáš Popela tpopela

View GitHub Profile
//
// HOWTO:
// 1. Go to script.google.com for the Google account that is receiving the
// email notifications from Fedora Discourse
// 2. Create a new project and rename it to "Fedora Discourse GMail Labeler"
// 3. Copy and paste this whole script in the editor and replace whatever
// content is there
// 4. Save the file
// 5. On the left side next to the editor click on the plus button next to
// Services and add a "Gmail API" service
@tpopela
tpopela / overlayed-packages.sh
Last active November 25, 2020 07:49
Show the overlayed packages on Silverblue/CoreOS together with all the dependencies (as opposed to the `rpm-ostree status` output)
#!/bin/sh
verboseStatus=$(rpm-ostree status -b -v)
baseCommitID=$(echo "$verboseStatus" | grep -Po "BaseCommit:\ \K.*$")
commitID=$(echo "$verboseStatus" | grep -v "BaseCommit" | grep -m 1 -Po "Commit:\ \K.*$")
rpm-ostree db diff "$baseCommitID" "$commitID"
@tpopela
tpopela / install-dnf
Last active September 1, 2023 10:37
Simple script that unlocks the current OSTree deployment if needed and installs the dnf for debugging purposes
#!/bin/sh
# Run this script, then install the debuginfo packages with:
# sudo dnf debuginfo-install PACKAGE
set -e
tmp=$(mktemp -d)
cleanup () {
rm -rf $tmp
}
@tpopela
tpopela / diff-fedora-runtime
Last active February 21, 2020 08:19
Generates the diff between two Fedora Flatpak runtimes
#!/bin/bash
# Generates the diff between two Fedora Flatpak runtimes.
# Examples:
# # This will generate the diff between two given runtimes
# generate-runtime-diff.sh flatpak-runtime-f30-3020190604123149.1 flatpak-runtime-f30-3020190612151453.1
#
# # This will diff the two latest runtimes for the given Fedora version
# generate-runtime-diff.sh 29
#
@tpopela
tpopela / restart-iceccd.sh
Created March 15, 2019 10:11
Restart iceccd service if ethernet connection changes
#!/bin/bash
# Restarts iceccd service if ethernet connection changes
#
# Put it under /etc/NetworkManager/dispatcher.d/
IF=$1
STATUS=$2
ETHERNET_IFACES=`nmcli device status | grep ethernet | awk '{ print $1 }'`
@tpopela
tpopela / gee_f29.patch
Last active January 2, 2019 12:03
Google Earth Enterprise 5.3.0 compilation on Fedora 29
commit bfb87b58931bd9e0c89e2f40ee10d89a1fe07356
Author: Tomas Popela <tomas.popela@gmail.com>
Date: Wed Jan 2 11:32:23 2019 +0100
Fix compilation of GEE 5.3.0 on Fedora 29
diff --git a/earth_enterprise/src/SConstruct b/earth_enterprise/src/SConstruct
index ae44c44..17bccc1 100644
--- a/earth_enterprise/src/SConstruct
+++ b/earth_enterprise/src/SConstruct
@tpopela
tpopela / denoisy.sh
Created June 5, 2018 15:09
Script to remove extra debug messages from WebKit JavaScriptCore CLoop
#!/bin/bash
# Removes debug messages from https://gist.github.com/tpopela/16adfd9b810ef33bb4c9
processFile()
{
if [ ! -f "$1".orig ]; then
exit 2
fi
@tpopela
tpopela / install-bodhi-update
Last active February 21, 2020 08:20
Install bodhi update from cli
#!/bin/bash
# install-bodhi-update:
# Download packages from given bodhi update and installs them with dnf.
#
# Usage:
# install-bodhi-update BODHI-UPDATE-ID
#
# Example:
# install-bodhi-update FEDORA-2016-5522a26f9b
@tpopela
tpopela / noisy_cloop.sh
Last active June 5, 2018 15:07
Script to make WebKit JavaScriptCore CLoop noisy for debugging
#!/bin/bash
# Use inside Source/JavaScriptCore/llint directory
processFile()
{
if [ ! -f "$1" ]; then
exit 2
fi