Skip to content

Instantly share code, notes, and snippets.

@kconner
kconner / macOS Internals.md
Last active June 27, 2024 18:48
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@kloon
kloon / functions.php
Last active October 27, 2021 04:47
WooCommerce 3.2: Add resend admin order email option that was removed
<?php
/**
* This adds back an option to resend the admin new order email from the order edit screen that was removed in WooCommerce 3.2
*/
/**
* Filter to add a new menu to the dropdown
*
* @param array $actions
* @return array
@eversionsystems
eversionsystems / woocommerce-ajax-checkout-spinner.css
Last active March 27, 2023 11:49
WooCommerce Change AJAX Spinner Gif On Checkout
/*
* Custom AJAX spinner on WooCommerce checkout
* The class used to load the overlay is .blockUI .blockOverlay
* The class used to load the spinner is .woocommerce .loader:before
*
*/
.woocommerce .blockUI.blockOverlay:before,.woocommerce .loader:before {
height: 3em;
width: 3em;
position: absolute;
@max6cn
max6cn / jquery.iframe_to_div.js
Created March 19, 2016 05:44 — forked from aklump/jquery.iframe_to_div.js
A jQuery plugin to replace iframes with divs containing their source by loading via ajax. Benefits use parent page's css and have an auto height to your iframe.
/**
* Convert iframes to divs via ajax iframe_to_div jQuery Plugin
*
* Uses javascript to replace iframes with divs containing their source content
* by loading via ajax. If you use this to load vanilla html snippets, this has the
* effect of applying the page's css to your vanilla html snippet.
*
* This will not work if the iframe src is not a relative link due to ajax restrictions across domains.
*
* As an example:
@jeroendeswaef
jeroendeswaef / compile_espeak.md
Last active July 31, 2016 02:00
compiling espeak on fresh ubuntu install

First download the source of espeak and unzip it in this directory: ~/Downloads/espeak-1.48.04-source/src

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe" 
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install libportaudio-dev
sudo apt-get install portaudio19-dev

cd ~/Downloads/espeak-1.48.04-source/src

cp portaudio19.h portaudio.h

<?php
/*
|--------------------------------------------------------------------------
| Excel To Array
|--------------------------------------------------------------------------
| Helper function to convert excel sheet to key value array
| Input: path to excel file, set wether excel first row are headers
| Dependencies: PHPExcel.php include needed
*/
function excelToArray($filePath, $header=true){
/**
* Convert iframes to divs via ajax iframe_to_div jQuery Plugin
*
* Uses javascript to replace iframes with divs containing their source content
* by loading via ajax. If you use this to load vanilla html snippets, this has the
* effect of applying the page's css to your vanilla html snippet.
*
* This will not work if the iframe src is not a relative link due to ajax restrictions across domains.
*
* As an example:
@rtrouton
rtrouton / gist:f92f263414aaeb946e54
Last active May 30, 2021 12:32
Install Xcode command line tools on 10.7.x - 10.10.x. Tested on 10.7.5, 10.8.5, 10.9.5 and 10.10.2.
#!/bin/bash
# Installing the Xcode command line tools on 10.7.x or higher
osx_vers=$(sw_vers -productVersion | awk -F "." '{print $2}')
cmd_line_tools_temp_file="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress"
# Installing the latest Xcode command line tools on 10.9.x or higher
if [[ "$osx_vers" -ge 9 ]]; then
/**
* Convert iframes to divs via ajax iframe_to_div jQuery Plugin
*
* Uses javascript to replace iframes with divs containing their source content
* by loading via ajax. If you use this to load vanilla html snippets, this has the
* effect of applying the page's css to your vanilla html snippet.
*
* This will not work if the iframe src is not a relative link due to ajax restrictions across domains.
*
* As an example:
@kythanh
kythanh / How to delete all Archive binaries generated by XCode
Created August 7, 2014 07:03
How to delete all Archive binaries generated by XCode
1. Open Terminal, then goto this folder: cd ~/Library/Developer/Xcode/Archives
2. Perform delete all folders and files: rm -rf *
You may need root permission to perform delete.