Skip to content

Instantly share code, notes, and snippets.

View FredNandrin's full-sized avatar

Fred Nandrin FredNandrin

  • Berlin, Germany
View GitHub Profile
@FredNandrin
FredNandrin / macOS_SytemPrefs.md
Created March 13, 2025 10:32 — forked from rmcdongit/macOS_SytemPrefs.md
Apple System Preferences URL Schemes

macOS 10.15 System Preference Panes

Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.

To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:

tell application "System Preferences"
	set CurrentPane to the id of the current pane
	set the clipboard to CurrentPane
@FredNandrin
FredNandrin / prepare.sh
Created February 28, 2025 16:18
From the root of the xCode project, this will transform all environment variables to a Secrets.swift in the Source folder.
#!/bin/bash
# prepareSecrets
#
# prepare the Secrets.swift file from environment variables
#
# Define output file
OUTPUT_FILE="Sources/Secrets.swift"
@FredNandrin
FredNandrin / RenewExpiredGPGkey.md
Created August 14, 2023 13:46 — forked from TheSherlockHomie/RenewExpiredGPGkey.md
Updating expired GPG keys and backing them up 🔑🔐💻

Updating expired GPG keys and their backup 🔑🔐💻

I use a GPG key to sign my git commits.

An error like this one might be a sign of an expired GPG key.

error: gpg failed to sign the data fatal: failed to write commit object
<?php
echo "<H1>".$_SERVER['HOSTNAME']."</H1>";
phpinfo();
// Based on code by Robert Kent, James Bavington & Tom Foyster
var dropCookie = true; // false disables the Cookie, allowing you to style the banner
var cookieDuration = 1; // Number of days before the cookie expires, and the banner reappears
var cookieName = 'Covid19'; // Name of our cookie
var cookieValue = 'on'; // Value of cookie
var cookieDivId = 'xxxx';
var cookieCloseButtonClass = 'yyyy';
function displayCovid19Banner() {
#!/bin/bash
# copy necessary lib for system command from root to chrooted directory
#
# Frédéric Nandrin - NanIT 2019 - [email protected]
# Tested on Debian 9
#
# USAGE : chrootcmd <chrooted dir> <cmd>
# ex : chrootcmd /home/fred /bin/ls
#
@FredNandrin
FredNandrin / disk.yaml.default
Created July 12, 2018 12:35
Limit dd-agent to main partition
instances:
# The use_mount parameter will instruct the check to collect disk
# and fs metrics using mount points instead of volumes
- use_mount: no
- excluded_filesystems:
- tmpfs
- none
- shm
- nsfs
sh install_mysql.sh
sh install_apache_php7.sh
sh install_wordpress.sh
apt install vsftpd fail2ban
echo "listen_address=127.0.0.1" >> /etc/vsftpd.conf
echo "listen_address6=::1" >> /etc/vsftpd.conf
service vsftpd restart
@FredNandrin
FredNandrin / wordpress-plugin-svn-to-git.md
Created May 1, 2018 19:02 — forked from kasparsd/wordpress-plugin-svn-to-git.md
Using Git with Subversion Mirroring for WordPress Plugin Development
@FredNandrin
FredNandrin / docker-compose.yml
Last active April 24, 2018 20:42
Docker-compose for Prestashop dev
version: '2'
volumes:
db-data:
vendor:
var:
services:
mysql:
image: mysql