Skip to content

Instantly share code, notes, and snippets.

@derralf
derralf / boop-obfuscate-e-mail.js
Created October 30, 2021 15:43
E-mail obfuscator for boop app
/**
{
"api":1,
"name":"Obfuscate E-Mail",
"description":"Obfuscates email address, uses alternating decimal code and hexadecimal code to make decryption difficult for harvesters.",
"author":"derralf",
"icon":"quote",
"tags":"encode,mail,obfuscate"
}
**/

Mac OS X 'QuarantineEvents' – view, delete and compress the database

Viewing Mac Download History

sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent'

Clear Mac Download History

@derralf
derralf / Grub-Menü wird nicht angezeigt (Linux auf Macbook).md
Last active September 27, 2020 05:26
Bring back Grub Menu on Macbook Dual Boot Installation

Grub-Menü wird nicht angezeigt (Linux auf Macbook)

Auf einem Macbook Pro 13" Mid 2010 – MacBookPro7,1 – wurde neben macOS auch Ubuntu 20.04 installiert.

Auf der selben SATA-SSD, auf einer weiteren Partition.
Ohne rEFInd, d.h. es wird beim Start mit ALT zwischen macOS oder Linux gewählt)

Problem:

Das Grub Menü wird nicht angezeigt.

@derralf
derralf / Macbook Pro 2010 + rEFInd + Mint or Ubuntu + proprietary nVidia drivers without GRUB.md
Created May 30, 2020 14:32
MacBookPro7,1 + rEFInd + proprietary nVidia drivers without GRUB

Macbook Pro 2010 + rEFInd + Mint/Ubuntu + proprietary nVidia drivers without GRUB

Wir haben ein Macbook Pro 13" Mid 2010 – MacBookPro7,1 – und möchten per rEFInd Mint booten.

Die Nouveau-Treiber sind nicht sehr performant (das MacBook wird heiß und die Akku hält nicht so lange). Deshalb sollen die propietären nVidia-Treiber genutzt werden.

Problem: Black Screen with nVidia Driver

@derralf
derralf / TransmitOpenTerminal.txt
Last active May 22, 2020 16:40
Transmit 5 open in Terminal (local and remote with delay)
on openTerminal(location, remoteHost, serverPort)
#
# Problem with original script:
# on some hosters the shell is not recognized as interactive and some features like aliases and colors do not work
# so we dont use the combined command:
# ssh -t me@myserver.com "cd /directory/wanted ; eval $SHELL -il"
# but write the 2 commands (ssh + cd) separately into the terminal window with a delay(!) in between
#
# the original script:
@derralf
derralf / Spotlight Mojave index Markdown.md
Created May 5, 2020 15:09
Unter macOS 10.14 Mojave Spotlight das indizieren von Markdown-Dateien (.md) beibringen

Spotlight Mojave index Markdown

Unter macOS 10.14 Mojave Spotlight das indizieren von Markdown-Dateien (.md) beibringen.

# kopiere RichText.mdimporter
cp -r /System/Library/Spotlight/RichText.mdimporter ~/

# benenne um in Markdown.mdimporter
mv ~/RichText.mdimporter Markdown.mdimporter
@derralf
derralf / elementalownsreset.yml
Created July 3, 2019 10:42
silverstripe-elemental: break cascading publishing / owns
# ==================================================================================
# Do not automatically publish all the individual elements when publishing the page
# Allow published and unpublished items on a page
#
# see:
# Disable Cascade-publishing of Element in ElementalArea
# https://github.com/dnadesign/silverstripe-elemental/issues/681
# or:
# QUESTION - On Page save&publish, it publishes all elements...
# https://github.com/dnadesign/silverstripe-elemental/issues/205
@derralf
derralf / _config_TinyMCEConfig.php
Last active January 21, 2020 15:55
TinyMCEConfig / HtmlEditorConfig > style_formats (Silverstripe 4)
<?php
// place this in /app/config.php
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
@derralf
derralf / BBEdit-TextWrangler-grep.txt
Last active February 26, 2019 09:06
BBEdit und Textwrangler Text ersetzen
ersetze erste 5 Zeichen je Zeile (grep)
finde: ^.....
ersetze durch:
entferne leere Zeilen (grep)
finde: \r+
ersetze durch: \r
entferne komplette Zeile mit einem bestimmten Zeichen (hier ") (grep)
finde: .*".*
@derralf
derralf / phpList-ACCESS_CONTROL_ALLOW_ORIGIN.txt
Last active January 26, 2022 16:12
Allow multiple Origins für phpList
/*
=========================================================================
Hack: Allow multiple Origins
z.B. für Ajax-Anmeldung von Subdomain
platziere dies zu oberst in /lists/config/config.php