Skip to content

Instantly share code, notes, and snippets.

View marcwittke's full-sized avatar
👷
weeks of coding save hours of planning

Marc Wittke marcwittke

👷
weeks of coding save hours of planning
  • Posadas, Argentina
View GitHub Profile
/usr/bin/xfreerdp \
/v:192.168.122.117 \
/scale:180 \
/gfx:AVC420:on \
/compression \
/network:broadband \
'/u:.\Marc' \
'/p:Pa$$w0rd' \
+clipboard \
-themes \
@marcwittke
marcwittke / docker-tls.md
Last active August 8, 2024 08:58
Securing the docker daemon with TLS certificates

Secure the docker daemon with TLS

first, let's create some directories to work in

mkdir -p ./docker_certs/ca ./docker_certs/server ./docker_certs/client
cd ./docker_certs

Oracle Database in containers

Here are the steps to get an Oracle Database 19c up and running in an OCI container. Since there are several bash scripts involved, a linux machine is advised. (while WSL may work, untested).

I ran the following on Fedora 37 with podman installed and an alias docker=podman.

1. Clone Oracle's docker-images github repo

#SSH
# -*- coding: utf-8 -*-
from collections import OrderedDict
from PyPDF2 import PdfReader
import os
def _getFields(obj, tree=None, retval=None, fileobj=None):
"""
Extracts field data if this PDF contains interactive form fields.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
using Microsoft.AspNetCore.DataProtection.Repositories;
using Npgsql;
namespace IdentityService.Infrastructure.DataProtection
{
public class PostgresDataProtectionKeyRepository : IXmlRepository
@marcwittke
marcwittke / bash.md
Last active April 18, 2021 10:17
Bash-Fu

move one up recursively

find . -type f -execdir mv -i {} .. \;

unzip each zip into separate directory named after zip archive

find . -name "*.zip" | while read filename; do unzip -o -d "${filename%.*}" "$filename"; done;

delete empty directories

find . -type d -empty -print [-delete]

using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using JetBrains.Annotations;
namespace TicketShop.Domain.Sales
{
@marcwittke
marcwittke / linux-power-management.md
Created April 26, 2020 20:05
Linux Power Management

CPU Frequency

Monitor CPU Frequency

watch -n 1 cat /proc/cpuinfo | grep "MHz"

List available CPU Frequency Governors

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governor

Show current CPU Frequency Governor

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

@marcwittke
marcwittke / Linux on P50.md
Last active December 27, 2018 16:34
Displaying on the nvidia GPU to access outside ports (HDMI + DP) on a Lenovo P50/P70

See original, badly formatted version here https://docs.google.com/document/d/1GnyBE1xc4qx3EF-IcUOwr7d9D8Npzy63Pwj-joOw86o

Displaying on the nvidia GPU to access outside ports (HDMI + DP)

Kernel modesetting and automatic driver power management (kernel >= 4.8)[b]

While kernel modesetting (KMS) isn’t required, on recent debian, the intel driver requires KMS. You can also avoid having to use the nouveau xorg driver altogether (as in remove xserver-xorg-video-nouveau), and let Xorg talk to the nouveau kernel driver. You will want both kernel driver modules to run with modesetting: