Skip to content

Instantly share code, notes, and snippets.

View bodsch's full-sized avatar

Bodo Schulz bodsch

View GitHub Profile
@dkam
dkam / markdown.rb
Created October 11, 2015 09:08
Markdown previewer with Sinatra, Redcarpet and Rouge
#!/usr/bin/env ruby
# Originally from: https://coderwall.com/p/ftn1la/markdown-preview-using-ruby-and-sinatra-simple-script
# gem install sinatra redcarpet rouge --no-document
require 'sinatra'
require 'redcarpet'
require 'rouge'
require 'rouge/plugins/redcarpet'
set :port, 3001
@kizbitz
kizbitz / dockerhub-v2-api-user.sh
Last active April 17, 2023 23:30
Get the list of images and tags for a Docker Hub user account.
#!/bin/bash
# Example for the Docker Hub V2 API
# Returns all imagas and tags associated with a Docker Hub user account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username and password
UNAME=""
UPASS=""
#!/usr/bin/env bash
# Installs/Configures:
# - Docker
# - Docker Registy Container with self-signed cert
#
# Tested on Ubuntu 14.04.1
# Must be executed with elevated privilages
if [ "$(id -u)" != "0" ]; then
@brandonrich
brandonrich / gist:67c0ae24b5abfef65134
Created July 5, 2015 02:22
Ruby AWS SDK v2 IAM user MFA example
# shows how to use the Ruby AWS SDK to list EC2 instance IDs
# when your API credentials have been placed under MFA requirements
# Prerequisites:
# you are running on a host that already has the AWS CLI set up with an IAM key pair
# that can describe EC2 instances (OTHERWISE, just pass a
# secret_access_id / secret_access_key pair to the STS client initializer)
# You have installed the Ruby AWS SDK Gem
# http://aws.amazon.com/sdk-for-ruby/
@waja
waja / README.md
Last active December 15, 2021 10:50
Migration from Debian Wheezy to Jessie
@dnsmichi
dnsmichi / icinga2-apply-for-in-dictionary
Last active June 25, 2019 21:24
Using icinga2 2.2 features with apply for in dictionary and attribute assignment
# cat 7560.conf
object Host "7560-server" {
import "test-generic-host"
address = "127.0.0.1"
check_command = "hostalive"
vars.interfaces["eth0"] = {
//vars.interfaces.eth0 = {
"2dcoord" = "3,5"
port = 1
@SaroLiao
SaroLiao / fontconfig.properties
Created September 14, 2014 00:10
JAVA fontconfig.properties
# %W% %E%
#
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
#
# Version
version=1
# Component Font Mappings
@ruudud
ruudud / tmux-ssh
Created June 19, 2014 13:09
Poor-mans cssh
#!/bin/bash
# Based on https://github.com/dennishafemann/tmux-cssh/blob/master/tmux-cssh
tmux_session_name="multissh"
tmux new-session -d -s "${tmux_session_name}" "ssh $1"
shift
hosts="${@}"
@soarez
soarez / ca.md
Last active May 28, 2024 02:57
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote