Skip to content

Instantly share code, notes, and snippets.

View gersilex's full-sized avatar

Leroy Förster gersilex

  • Hamburg, Germany
View GitHub Profile
@blacktm
blacktm / install_ruby_rpi.sh
Last active November 28, 2024 20:35
A Bash script to install Ruby on the Raspberry Pi
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Installs Ruby using rbenv/ruby-build on the Raspberry Pi (Raspbian)
#
# Run from the web:
# bash <(curl -s https://gist.githubusercontent.com/blacktm/8302741/raw/install_ruby_rpi.sh)
# --------------------------------------------------------------------------------------------
# Set the Ruby version you want to install
@kozmonaut
kozmonaut / linux-packages
Created April 14, 2014 11:44
Backup and restore installed packages inside Linux Debian
# Backup your packages list
# Get a packages list
dpkg --get-selections > ~/Package.list
# Copy list of repositories
sudo cp /etc/apt/sources.list ~/sources.list
# Export repo keys
sudo apt-key exportall > ~/Repo.keys
@tadly
tadly / pacaur_install.sh
Last active December 9, 2024 12:21
A simple shell script to quickly / easily install "pacaur" on archlinux
#!/bin/sh
#
# !!! IMPORTANT !!!
# As of 2017-12-14, pacaur is unmaintained (https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144)
# For alternatives see the arch wiki: https://wiki.archlinux.org/index.php/AUR_helpers#Active
# pacaur seems to get occasional updates to fix breaking changes due to pacman updates though.
#
# If you are new to arch, I encourage you to at least read and understand what
# this script does befor blindley running it.
# That's why I didn't make a one-liner out of it so you have an easier time
@fstern
fstern / gist:a68b215b4e01392d405bcc86cecf2f6f
Last active October 12, 2016 14:02
My journey with chef...

my chef story

(names removed to protect the guilty)

On one day, the chef-client on our opennebula hosts failed. After looking into it, someone had updated the base recipe and removed a repository which was no longer reachable. So, I'll update the environment of the application cookbook.

$ berks update

Now test it.

$ kitchen converge

@xbb
xbb / README
Last active March 14, 2025 17:53
IDRAC6 Virtual Console Launcher
Use this as an example on how to start the virtual console without the need of Java Web Start or accessing it from the web interface.
You can use the user and password that you use for the web interface.
You need an old JRE... I used 1.7.0_80 from the Server JRE package, also I have tested successfully 1.7.0_79 with MacOS.
You don't need to install it, just extract it or copy the files in "jre" folder.
Open the viewer.jnlp file that you get by launching the virtual console from the web interface with a text editor.
Note the urls to the jar files. Download the main jar file avctKVM.jar and the libs for your operating system and architecture.
Extract the dlls (.so Linux, .jnilib MacOS) from the jar libs.
@hExPY
hExPY / demo.items
Created January 20, 2017 07:40
Openhab 2 German Weather Dashboard
Number Weather_Temperature "Temperatur [%.2f °C]" <temperature> (groupDashboardWeather) {weather="locationId=home, type=temperature, property=current"}
Number Weather_Temperature_Feel "gefühlte Temperatur [%.2f °C]" <temperature_cold> (groupDashboardWeather) {weather="locationId=home, type=temperature, property=feel"}
DateTime Sunrise_Time "Sonnen Aufgang [%1$tH:%1$tM]" <sunrise> (groupDashboardWeather) {channel="astro:sun:hamburg:rise#start" }
DateTime Sunset_Time "Sonnen Untergang [%1$tH:%1$tM]" <sunset> (groupDashboardWeather) {channel="astro:sun:hamburg:set#start" }
Number Weather_Humidity "Luftfeuchtigkeit [%d %%]" <humidity> (groupDashboardWeather) {weather="locationId=home, type=atmosphere, property=humidity"}
Number Weather_Pressure "Luftdruck [%.2f mb]" <fan> (groupD
@lmakarov
lmakarov / lambda-basic-auth.js
Created August 30, 2017 19:15
Basic HTTP Authentication for CloudFront with Lambda@Edge
'use strict';
exports.handler = (event, context, callback) => {
// Get request and request headers
const request = event.Records[0].cf.request;
const headers = request.headers;
// Configure authentication
const authUser = 'user';
const authPass = 'pass';
@maiers
maiers / gist:3a9dd183dd5e6c434a85694c1fb2a57a
Created May 27, 2018 14:58
Compare DNS output from two Servers for multiple domains
#!/bin/bash
# This script will create a visual comparison of the
# output of the two DNS servers defined as NS0 and
# NS1 for the fqdn defined in DOMAINS
#
# Created: 2018-05-27
# Author: Sebastian <[email protected]>
#
# Source: https://stackoverflow.com/a/29079962/683977
@wilmardo
wilmardo / jackett.md
Created October 29, 2019 13:08
Jackett add public indexers all in one go

Source: Jackett/Jackett#1576 (comment)

From the Jackett page, click the "add indexer" button so that the pop up window with the full list of indexers appears.

You'll then need to open your browser's development toolbar (in Chrome just hit F12) and go to the JavaScript Console and enter the following:

////hack to add all free indexers in Jackett
$(document).ready(function () {
	EnableAllUnconfiguredIndexersList();
@mzealey
mzealey / migrate_live_ssh
Last active May 16, 2024 09:57 — forked from gersilex/migrate_live_ssh
OpenNebula Live Migration Examples
#!/usr/bin/env bash
#
# Live migration-over-SSH script for use with OpenNebula.
# Set the 'migrate' action to run this script in /etc/one/oned.conf
# for your respective virtualization type. Only KVM is supported right now.
#
# Author: Leroy Förster <[email protected]>
# Contributor: Paul Jost <paul.jost.immonet.de>
# Contributor: Mark Zealey - port to ONE 5.10
#