Skip to content

Instantly share code, notes, and snippets.

View Finkregh's full-sized avatar
🚲

Oluf Lorenzen Finkregh

🚲
View GitHub Profile
@Finkregh
Finkregh / install.sh
Created February 8, 2024 14:01 — forked from llimllib/install.sh
The script I use to set up a new mac just the way I like it
#!/usr/bin/env bash
# many settings from https://raw.githubusercontent.com/mathiasbynens/dotfiles/master/.macos
# many settings from https://raw.githubusercontent.com/thoughtbot/laptop/master/mac
# instructions on finding the default you've changed: https://pawelgrzybek.com/change-macos-user-preferences-via-command-line/
# previous install notes at:
# https://gist.github.com/llimllib/ee591266e05bd880629a4e7511a61bb3
# https://gist.github.com/llimllib/e864a92da94ceb1ef0da2e06fd1f8d70
# https://gist.github.com/llimllib/3fc4fefcfc0152dad8c58201246d8802
#
# this script's URL is: https://gist.github.com/llimllib/c4dd0a98a426022b0365d4c0a9090460
[Unit]
Description=rclone %i
[Service]
Nice=19
IOSchedulingClass=idle
#KillSignal=SIGINT
EnvironmentFile=/usr/local/etc/rclone-spawn/%i.env
ExecStart=/usr/local/bin/rclone-spawn.sh %i
@Finkregh
Finkregh / remove dotfile symlinks.sh
Created April 7, 2023 16:46
unlink dotfiles created by e.g. stow
@Finkregh
Finkregh / Caddyfile
Created June 5, 2021 19:34
nextcloud php-fpm caddy 2
(headers) {
header {
-Server
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
X-XSS-Protection "1; mode=block"
X-Permitted-Cross-Domain-Policies "none"
X-Content-Type-Options "nosniff"
X-Frame-Options "SAMEORIGIN"
X-Robots-Tag "nine"
Permissions-Policy interest-cohort=()
@Finkregh
Finkregh / ansible-openstack-vm.yml
Created April 29, 2021 13:05
Ansible: create OpenStack VM
---
- name: Deploy on OpenStack
hosts: localhost
gather_facts: false
tasks:
- name: get OS server info
os_server_info:
server: "fedora-from-ansible"
register: instance_state
ignore_errors: true
@Finkregh
Finkregh / update-gitea-bin.sh
Created February 26, 2021 20:20
shell script to download the latest gitea release
#!/usr/bin/env bash
DL_URL="$(curl -s https://api.github.com/repos/go-gitea/gitea/releases/latest | grep "browser_download_url.*arm-6\"" | cut -d \" -f 4)"
wget "${DL_URL}" -O /mnt/nfs/gitea/gitea
#chmod +x /mnt/nfs/gitea/gitea
sudo systemctl restart gitea
@Finkregh
Finkregh / layout.json
Last active May 14, 2021 18:12
keyboard.io chrysalis atreus config - colemak-DHm
{
"keymap": [
{
"keyCode": 20,
"label": "Q"
},
{
"keyCode": 26,
"label": "W"
},
@Finkregh
Finkregh / semantic-layout.html
Created December 23, 2020 21:30 — forked from thomd/semantic-layout.html
Standard HTML5 Semantic Layout
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Title</title>
<link href="stylesheets/main.css" rel="stylesheet" />
</head>
<body>
<header>
<hgroup>
@Finkregh
Finkregh / otp.txt
Created November 26, 2020 10:00 — forked from sshimko/otp.txt
Yubikey + FreeIPA Manual Setup
In Yubikey tool:
1. Click OATH+HOTP tab
2. Click Advanced
3. Deselect token identifier.
4. Press Generate to create a new random seed.
@Finkregh
Finkregh / ansible-find-filenames.yml
Created January 21, 2020 09:21
ansible: get files from directory - only names without path
- name: "get files from dir"
find:
paths: "/some/dir/foo"
register: found_files
- name: print file names without path
debug:
msg: "{{ found_files['files'] | map(attribute='path') | map('regex_replace','^.*/(.*)$','\\1') | list }}"