Skip to content

Instantly share code, notes, and snippets.

View balderclaassen's full-sized avatar

Balder balderclaassen

View GitHub Profile
@balderclaassen
balderclaassen / Gnome-extension-configs.txt
Last active September 14, 2024 16:00
Backup, reset, restore, configuration of a gnome extension.
How to export (backup), reset to defaults and import (restore) the configuration of a gnome extension.
// prints the whole config to a file
dconf dump /org/gnome/shell/extensions/<extension-name>/ > ~/<backupfile>
// Resets the config to defaults (might wanna check first if the dump was a succes by opening the file)
dconf reset -f /org/gnome/shell/extensions/<extension-name>/
// Loads configuration from a file into your gnome-shell
dconf load /org/gnome/shell/extensions/<extension-name>/ < ~/<backupfile>
From what I can tell a good way to determine <extension-name> is from its url at https://extensions.gnome.org
However its better to be safe and launch dconf editor , browse to /org/gnome/shell/extensions/ and check the name.
do{
confirm("Hello. This is a Rock Paper Scissors game for 2 players. You will be using the same keyboard and therefore it is neccesary that you look the other way while the other player is making their choice. When you start, a new dialog will pop up asking the first player to make their choice. Then a second dialog for the other player. After this a dialog will display the results. OK can be used to start another game and Cancel to quit. Click OK to begin.")
var ChoiceP1 = prompt("Rock, Paper, Scissors (Type your choice below. To prevent the other person from hearing what you type, R, P and S work as well.)")
if(ChoiceP1=="Rock" || ChoiceP1=="rock" || ChoiceP1=="R" || ChoiceP1=="r" || ChoiceP1=="ROCK"|| ChoiceP1== "Steen" || ChoiceP1=="Sten")
{
ChoiceP1=1
}