Skip to content

Instantly share code, notes, and snippets.

View sashareds's full-sized avatar

Alex sashareds

  • Reds Lab
  • Dublin, Ireland
View GitHub Profile
@dmhendricks
dmhendricks / benchmarking-ubuntu.md
Last active June 11, 2023 21:12
This is what I use to benchmark new Debian-based instances on any provider, VPS or dedicated.

Linux Benchmarking

These instructions are for Debian-based distributions, but they are similar for RPM-based distros.

It is best to do multiple tests and average the results, especially on VPS which may be affected by peek traffic.

sudo su
apt update && apt upgrade
@fastlinemedia
fastlinemedia / fl_builder_icon_sets.php
Created July 24, 2017 23:01
Using the fl_builder_icon_sets filter to add custom icon fonts to Beaver Builder
function my_custom_icons( $sets ) {
$path = get_stylesheet_directory() . '/my-custom-icons/';
$url = get_stylesheet_directory_uri() . '/my-custom-icons/';
$data = json_decode( file_get_contents( $path . 'selection.json' ) );
$icons = array();
foreach ( $data->icons as $icon ) {
$prefs = $data->preferences->fontPref;
<?php
/*
Created by: craig@123marbella.com 16/03/2014
Name of script: Create WordPress Admin User
Description: This script will create an admin user in wordpress
Usage: Create a new file in the root of the hosting account and drop this code into it then execute the script through the browser.
@chrislkeller
chrislkeller / import_json_appsscript.js
Last active July 16, 2024 13:26
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();