Skip to content

Instantly share code, notes, and snippets.

View dalemoore's full-sized avatar

Dale Moore dalemoore

View GitHub Profile
@ChrisTollefson
ChrisTollefson / Boot Camp Assistant - USB Install Disk.md
Last active April 6, 2024 16:06
Boot Camp Assistant - Enabling creation of bootable USB disks for installing Windows
@bacoords
bacoords / grab_vimeo_thumbnail.php
Last active January 24, 2024 09:40
Grab a thumbnail of a private (but embeddable) Vimeo video
<?php
/**
* Grab the url of a publicly embeddable video hosted on vimeo
* @param str $video_url The "embed" url of a video
* @return str The url of the thumbnail, or false if there's an error
*/
function grab_vimeo_thumbnail($vimeo_url){
if( !$vimeo_url ) return false;
$data = json_decode( file_get_contents( 'http://vimeo.com/api/oembed.json?url=' . $vimeo_url ) );
@ibraheem4
ibraheem4 / postgres-brew.md
Last active May 20, 2024 07:49 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
<?php
/**
Plugin Name: Caldera Forms Add-on For Remote API
Description: Example Caldera Forms processor to send data to a remote API
*/
/**
* Register processor
*/
add_filter( 'caldera_forms_get_form_processors', function( $processors ) {
@rvl
rvl / git-pushing-multiple.rst
Created February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@coccoinomane
coccoinomane / Excel Password Generator.md
Last active May 21, 2024 16:27
Copy this formula into an Excel cell to generate a random 9-character password

Copy this formula into an Excel cell to generate a random 9-character password. Then Copy & Paste Special (as value) in place in order to avoid the cell being continuosly re-evaluated.

English version

=CHAR(RANDBETWEEN(65;90))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(65;90))&RANDBETWEEN(1000;9999)&CHAR(RANDBETWEEN(42;43))

English version (with commas)

********* <sslsupport@namecheap.com>
Dec 13, 2015, 10:53 AM
to:
“emailremoved” <emailremoved>
Dear Jeremy,
We are deeply sorry to know that you have decided to end our relationships, both because we value your business and because we truly believe purchased SSL is a better choice in most cases.
We'll happily provide a 30% discount on your SSL renewal if you'll stay with us.
@mathetos
mathetos / plugin.php
Last active April 13, 2023 16:48
Dependent Plugin Activation/Deactivation and Alert
<?php
/*
* Dependent Plugin Activation/Deactivation
*
* Sources:
* 1. https://pippinsplugins.com/checking-dependent-plugin-active/
* 2. http://10up.com/blog/2012/wordpress-plug-in-self-deactivation/
*
*/
@craigsimps
craigsimps / functions.php
Created April 18, 2015 16:16
Add custom meta field to WooCommerce order email.
add_filter('woocommerce_email_order_meta_fields', 'dog_breed_checkout_field_order_meta_fields', 10, 3 );
function dog_breed_checkout_field_order_meta_fields( $fields, $sent_to_admin, $order ) {
$fields['dog_breed_name'] = array(
'label' => __( 'Dog Breed' ),
'value' => get_post_meta( $order->id, 'dog_breed_name', true ),
);
return $fields;
}
@hissy
hissy / importer-class-filter-example.php
Last active July 2, 2020 10:47
[Really Simple CSV Importer] add-on: Update row based on a custom field ID/key match
<?php
/*
Plugin Name: Update row based on a custom field ID/key match
Plugin URI: https://wordpress.org/support/topic/update-row-based-on-a-custom-field-idkey-match
*/
add_filter('really_simple_csv_importer_class', function() {
return "ImporterCustomize";
});