Skip to content

Instantly share code, notes, and snippets.

View rnwolf's full-sized avatar

Rudiger Wolf rnwolf

View GitHub Profile
@rnwolf
rnwolf / gist:ed2944bb0dd023e77424769e929c428e
Created October 12, 2020 15:19
Org-Roam Layer for Spacemacs
;;"C:\Users\rnwol\.emacs.d\private\org-roam\packages.el"
(defconst org-roam-packages
'(org-roam))
(defun org-roam/init-org-roam ()
(use-package org-roam
:hook
(after-init . org-roam-mode)
:custom
(org-roam-directory "~/org-roam")
@rnwolf
rnwolf / spacemacs-cheshe.md
Last active June 26, 2019 05:54 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w d - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers
@rnwolf
rnwolf / lxd.py
Created June 24, 2018 21:01 — forked from haarcuba/lxd.py
ansible inventory module that lists lxd containers
#!/usr/bin/env python3
import sys
import subprocess
import re
def containers():
lxcOutput = subprocess.check_output( ['lxc', 'list' ] )
ips = re.compile( '\d+\.\d+\.\d+\.\d+' ).findall( str( lxcOutput ) )
nodes = dict( hosts = ips, vars = { "ansible_user": "root" } )
inventory = dict( nodes = nodes )
@rnwolf
rnwolf / spacemacs-keybindings.md
Last active February 24, 2024 08:45 — forked from kiambogo/spacemacs-keybindings
spacemacs keybindings that i need to learn
from jira.client import JIRA
import argparse
import os
"""
In a Virtual Python Environment with jira package installed,
You can create subtasks for a given Jira Issue, based on a tab delimited file containing subtask details.
Environment variables for the Jira connections need to be set.
python createcppjirasubtasks.py --subtasks subtasks.tsv GPE-3238
@rnwolf
rnwolf / 1_google_cloud_storage_backup_tutorial.md
Created July 7, 2017 18:45
Tutorial shows how to make backups to Google Cloud Storage.

Google Cloud Storage backup tutorial

Introduction

This tutorial shows how to make backups to Google Cloud Storage. The backups are:

  • automatic
  • stored off site
  • incremental
@rnwolf
rnwolf / snapScript.sh
Created November 13, 2016 21:25
Bash helper script to help with the automation of routine snapRAID tasks. Add it as a cron job to automate the routine tasks of running sync and scrub. Script will optionally send you email of status and issues encountered during the run.
#!/bin/bash
#######################################################################
# This is a helper script that keeps snapraid parity info in sync with
# your data and optionally verifies the parity info. Here's how it works:
# 1) Checks for size 0 .nzb files (plex)
# 2) Calls diff to figure out if the parity info is out of sync.
# 3) If parity info is out of sync, AND the number of deleted or changed files exceed
# X (each configurable), it triggers an alert email and stops. (In case of
# accidental deletions, you have the opportunity to recover them from
if [ ! -f $1 ]
then
echo "please provide a file in arg"
exit -1
fi
#assign folder to upload
if [ -z "$2" ]
then
folderid="root"