Skip to content

Instantly share code, notes, and snippets.

@b0gdanw
b0gdanw / Disable-Ventura-Bloatware.sh
Last active October 18, 2024 02:02
Disable Ventura Bloatware
#!/bin/zsh
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12) and macOS Ventura (13)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@JavierCane
JavierCane / listGoogleDriveSharedDocuments.js
Last active February 21, 2024 11:54 — forked from woodwardtw/tellmeyoursecrets.js
Google Spreadsheet script that lists all the shared documents inside a specified folder and all its subfolders recursively. Skips out the documents shared internally (with specified email addresses)
function start() {
const sheet = SpreadsheetApp.getActiveSheet();
sheet.appendRow(["Name", "Sharing Access", "Sharing Permission", "Get Editors", "Get Viewers", "Date", "Size", "URL", "Download", "Description", "Type"]);
const folder = DriveApp.getFolderById("folder_id_copied_from_the_url_without_the_google_drive_domain");
recursiveListSharedFiles(folder, sheet);
}
function recursiveListSharedFiles(folder, sheet) {
@wpmudev-sls
wpmudev-sls / wpmudev-forminator-unique-identifier.php
Last active June 21, 2023 12:24
[Forminator Pro] - Submission unique identifier
<?php
/**
* Plugin Name: [Forminator Pro] - Submission unique identifier
* Plugin URI: https://premium.wpmudev.org/
* Description: Generate a unique code for each form submission (as of 1.12.1)
* Author: Alessandro Kaounas @ WPMUDEV
* Author URI: https://premium.wpmudev.org/
* Task: 0/11289012348292/1175564087636585
* License: GPLv2 or later
*/
@wpmudev-sls
wpmudev-sls / wpmudev-forminator-custom-submission-lookup.php
Created March 30, 2020 19:36
[Forminator Pro] - Custom submission lookup
<?php
/**
* Plugin Name: [Forminator Pro] - Custom submission lookup
* Plugin URI: https://premium.wpmudev.org/
* Description: Generate a unique code and access form submission using it (as of 1.12.1)
* Author: Alessandro Kaounas @ WPMUDEV
* Author URI: https://premium.wpmudev.org/
* Task: 0/11289012348292/1168805940889796
* License: GPLv2 or later
*/
@wpmudev-sls
wpmudev-sls / forminator-submit-before-paypal.php
Last active May 14, 2022 17:09
[Forminator] - Submit Form before PayPal payment. This snippet allows to submit the form before PayPal payment.
<?php
/**
* Plugin Name: [Forminator] - Submit Form before PayPal payment
* Plugin URI: https://premium.wpmudev.org/
* Description: This snippet allows to submit the form before PayPal payment
* Author: Panos Lyrakis @ WPMUDEV
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
*/
@ichaer
ichaer / tellmeyoursecrets.js
Last active June 30, 2023 06:54 — forked from woodwardtw/tellmeyoursecrets.js
google script that lists information on google drive files and folders shared by link
var getFullPath = function(pathObj) {
var out = '';
var sep = '/';
var folderIter = pathObj.getParents();
while(folderIter.hasNext()) {
out += sep + folderIter.next().getName();
}
out += sep + pathObj.getName();
return out;
};
@wpmudev-sls
wpmudev-sls / wpmudev-forminator-listing-author.php
Last active November 21, 2022 15:41
[Forminator Pro] - Send email to listing's author. Extend existing functionality of Easy Property Listing to send email to listing's author
<?php
/**
* Plugin Name: [Forminator Pro] - Send email to listing's author
* Plugin URI: https://premium.wpmudev.org/
* Description: Extend existing functionality of Easy Property Listing to send email to listing's author (as of 1.9)
* Author: Alessandro Kaounas @ WPMUDEV
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
*/
@bappi-d-great
bappi-d-great / code.php
Created October 24, 2018 13:23
WPMU DEV Forminator phone number validation
<?php
// Assuming one phone field in a form
add_filter( 'forminator_custom_form_submit_errors', 'check_form_data', 99, 3 );
function check_form_data( $submit_errors, $form_id, $field_data_array ) {
$valid = false;
foreach( $field_data_array as $val ) {
if( $val['name'] == 'phone-1' ) {
$phone = $val['value'];
@bappi-d-great
bappi-d-great / code.php
Created July 4, 2018 08:23
Use country list in forminator
<?php
add_filter( 'forminator_field_single_markup', function( $html, $id, $required, $options, $value_type ) {
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
<?php
$wrappers = array(
array(
'wrapper_id' => 'wrapper-1511378776546-9087',
'fields' => array(
array(
'element_id' => 'name-1',
'type' => 'name',
'cols' => '12',