Skip to content

Instantly share code, notes, and snippets.

View karstengresch's full-sized avatar
:octocat:
.

Karsten Gresch karstengresch

:octocat:
.
View GitHub Profile
@karstengresch
karstengresch / README.md
Created February 13, 2020 17:01 — forked from nwade/README.md
Remove SentinelOne Agent - macOS High Sierra/Mojave

Warning - use at your own risk

Remove SentinelOne agent from Mac

  1. Boot into Recovery Mode by holding Cmd+R during reboot
  2. Open Terminal from top menubar
  3. Run /Applications/Utilities/Disk\ Utility.app/Contents/MacOS/Disk\ Utility to open Disk Utility
  4. If your startup disk is encrypted, use Disk Utility to mount it
  5. In Terminal, run chroot /Volumes/Macintosh\ HD
  6. Execute the deletion commands or script
@karstengresch
karstengresch / WARNING.md
Last active February 6, 2020 16:20 — forked from m4rcsch/WARNING.md
Remove SentinelOne agent from Mac. Because honestly, it doesn't seem to do anything at all. Run as root, best is to do this from a recovery mode, single user mode with writeable filesystem, ...

USE AT OWN RISK

.

@karstengresch
karstengresch / Podman-on-MacOS.md
Created December 20, 2019 15:14 — forked from rbo/Podman-on-MacOS.md
Podman on Mac OS
$ export PATH=$(pwd):$PATH
$ podman-machine create box
Podman machine "box" already exists
$ podman-machine start box
Starting "box"...
@karstengresch
karstengresch / what-is-svelte.md
Created December 6, 2019 15:38 — forked from Rich-Harris/what-is-svelte.md
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

@karstengresch
karstengresch / autofs.md
Created October 18, 2019 10:14 — forked from rudelm/autofs.md
Use autofs on Mac OS X to mount network shares automatically during access

Autofs on Mac OS X

With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.

Prepare autofs to use a separate configuration file

autofs needs to be configured so that it knows where to gets its configuration. Edit the file '/etc/auto_master' and add the last line:

#
# Automounter master map
#

+auto_master # Use directory service

@karstengresch
karstengresch / gist:5476d8bbf32e998ec56737bc27467b66
Created July 12, 2019 14:59 — forked from Rambou/gist:c6769caee19b0b9915d8342b86c3ef72
Installing Nvidia propreatary drivers in Linux with UEFI enabled
If, like me, your are booting with UEFI (because having a triple boot ubuntu-windows-mac or because UEFI is the most modern type of bootloader and successor of EFI :p), you have to sign the proprietary modules each time they are recompiled (or upgrade kernel version) so that they are allowed to be loaded in the kernel.
1) Step one, create a self-signed certificate to sign nvidia driver:
sudo openssl req -new -x509 -newkey rsa:2048 -keyout UEFI.key -outform DER -out UEFI.der -nodes -days 36500 -subj "/CN=rambou_nvidia/"
2) step two load and store certificate in a supplementary key database MOC
sudo mokutil --import UEFI.der
3) step three reboot your system
At this step after reboot you will be prompted to select your certificate to import in in key database. If you have inserted a password at certificate creation you'll be prompted to insert it. If you are not prompted, you may have to enter the BIOS by using function keys at boot time.
@karstengresch
karstengresch / restart_bluetooth.sh
Created April 23, 2019 21:00 — forked from nicolasembleton/restart_bluetooth.sh
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@karstengresch
karstengresch / 3scale_Install.asciidoc
Created March 26, 2019 21:13 — forked from gsaslis/3scale_Install.asciidoc
Deploy 3scale API Management on Minishift

Installing 3scale on your Laptop

Pre-requisites

.or your desktop. Or a VM in the cloud. Or wherever it is you want to deploy 3scale to start exploring!
  • ❏ Minishift: 3scale is currently targeted for deployment on openshift, and minishift is the recommended development environment for that.

  • oc command-line tool [optional. you can also use the web-based interface.]

tl;dr

@karstengresch
karstengresch / LinkedTextView.h
Created March 20, 2019 22:08 — forked from benjaminbojko/LinkedTextView.h
UITextView Subclass to avoid Long-Press Delays with embedded Links
//
// LinkedTextView.h
//
// Created by Benjamin Bojko on 10/22/14.
//
// The MIT License (MIT)
//
// Copyright (c) 2014 Benjamin Bojko
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
import Foundation
import UIKit
// Usage Examples
let system12 = Font(.system, size: .standard(.h5)).instance
let robotoThin20 = Font(.installed(.RobotoThin), size: .standard(.h1)).instance
let robotoBlack14 = Font(.installed(.RobotoBlack), size: .standard(.h4)).instance
let helveticaLight13 = Font(.custom("Helvetica-Light"), size: .custom(13.0)).instance
struct Font {