This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/sorisum/valheim-server-docker | |
version: "3.9" | |
services: | |
valheim: | |
image: lloesche/valheim-server | |
volumes: | |
- /mnt/valheim:/config | |
- valheim_data:/opt/valheim | |
ports: | |
- "2456-2458:2456-2458/udp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.thingiverse.com/developers/rest-api-reference | |
/******************************************************************************* | |
* The headers needed for authenticating with the API. | |
* Get the SECRET_TOKEN using the browser tools of Firefox or Chrome: | |
* 1. Open the browser tools with F12 or ctrl+shift+i | |
* 2. Navigate to the Network tab | |
* 3. Reload a Thingiverse page | |
* 4. Locate a and select a request to api.thingiverse.com | |
* 5. Find the request headers and copy the token next to Authorization: Bearer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /etc/apt/apt.conf.d/50unattended-upgrades | |
// Unattended-Upgrade::Origins-Pattern controls which packages are | |
// upgraded. | |
// | |
// Lines below have the format format is "keyword=value,...". A | |
// package will be upgraded only if the values in its metadata match | |
// all the supplied keywords in a line. (In other words, omitted | |
// keywords are wild cards.) The keywords originate from the Release | |
// file, but several aliases are accepted. The accepted keywords are: | |
// a,archive,suite (eg, "stable") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
## | |
# Run one or more specs as many times as you need in a row. | |
# | |
# The files are loaded just once for speed and | |
# failure counts are tracked and reported at the end. | |
# | |
# Provide the number of times and the file(s). | |
# i.e. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# A set of commands to run as pre-commit hooks for git. | |
# | |
# Save this to .git/hooks/pre-commit and make executable to enable | |
# | |
# This will run whenever we run `git commit`. | |
# To skip this, add `-n` or `--no-verify` flag. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails' | |
# Return the first value from the block that evalues to present. | |
# | |
# objects = [OpenStruct.new(name: nil), OpenStruct.new(name: ' '), OpenStruct.new(name: 'Matz')] | |
# objects.find_present(&:name) # => "Matz" | |
module Enumerable | |
def find_present(&block) | |
each do |item| | |
result = yield(item) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/haproxy/haproxy.cfg | |
global | |
maxconn 4096 | |
user haproxy | |
group haproxy | |
daemon | |
log 127.0.0.1 local0 debug | |
# Default SSL material locations | |
ca-base /etc/ssl/certs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
## | |
# Retrieve MFA credentials using the default profile and saving them to the mfa profile. | |
# Old credentials are removed in this process. | |
# | |
require 'json' | |
AWS_CREDS_FILE_PATH = File.join(ENV['HOME'], '.aws/credentials') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
# Place this file in ~/.local/share/applications/ | |
Name=hydrapaper | |
GenericName=HydraPaper | |
Comment=A Gtk utility to set two different backgrounds for each monitor on GNOME | |
Exec=flatpak run org.gabmus.hydrapaper | |
Terminal=false | |
Type=Application | |
StartupNotify=true | |
# https://github.com/GabMus/HydraPaper/raw/master/data/icons/org.gabmus.hydrapaper.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install HydraPaper on Ubuntu 18.04 | |
# No super user access required if flatpak is installed | |
# HarlemSquirrel.github.io | |
# Install flatpak | |
sudo apt install -y flatpak gnome-software-plugin-flatpak | |
# Add flathub repo for the current user | |
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo |