Skip to content

Instantly share code, notes, and snippets.

View guenter's full-sized avatar

Tobi Knaup guenter

View GitHub Profile
@guenter
guenter / smb.conf
Created September 18, 2024 00:37
Configure Samba and Avahi on a Linux server to use as a Time Machine for macOS clients.
[global]
## General
server role = standalone server
workgroup = WORKGROUP
server smb encrypt = desired
## Logging
logging = file
log file = /var/log/samba/log.%m
log level = 2
@guenter
guenter / move_to_rds.rb
Created November 11, 2010 02:14
A quick and dirty script to move a database into Amazon RDS (or any other database). Can transfer part of the data beforehand.
require 'fileutils'
start_time = Time.now
SOURCE_DB = {
:name => 'db_name',
:user => 'db_user',
:password => 'db_pass',
:host => 'localhost'
@guenter
guenter / http.py
Created November 14, 2013 17:01
Simple Python HTTP server
import sys
port = 8080
if sys.version_info.major == 3:
import http.server
import socketserver
handler = http.server.SimpleHTTPRequestHandler
httpd = socketserver.TCPServer(("",port), handler)
elif sys.version_info.major == 2:
@guenter
guenter / Main.scala
Last active September 17, 2020 11:25
A simple Mesos "Hello World": downloads and starts a Python web server on every node in the cluster.
import mesosphere.mesos.util.FrameworkInfo
import org.apache.mesos.MesosSchedulerDriver
/**
* @author Tobi Knaup
*/
object Main extends App {
@guenter
guenter / bash-one-liners.md
Created November 24, 2019 06:39
Bash One-liners to clean up your everday messes

Delete all the files after accidentally extracting a tarball and spilling files allover

tar tf oopsie.tgz | xargs rm
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@guenter
guenter / HDFS.ipynb
Last active May 21, 2018 21:00
Creating Pandas data frames from various file formats stored in HDFS
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@guenter
guenter / README.md
Created March 9, 2018 17:25
Demo Kubernetes on DC/OS

Setup

These instructions are for DC/OS 1.11.0 and Kubernetes package 1.0.0-1.9.3.

Service Accounts

Install the DC/OS Enterprise CLI, then create a keypair and a service account for Kubernetes. Securely store the private key in the DC/OS secrets store.