Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Find Scrollbar width, necessary for sensible, perfect, Wide and Full Alignments.
*
* @package Some_Theme
*/
/**
* Learned from code at
* https://www.filamentgroup.com/lab/scrollbars/
* and
@WraithKenny
WraithKenny / add-ssl.sh
Created June 6, 2019 14:29
Snippets to add local (mini) Certificate Authority and local SSL Certificates for Mac
#!/bin/bash
# Exit if any command fails
set -e
echo -e "Setting up Local SSL...\n"
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
{
"cmd": [
"lessc",
"${file_base_name}.less",
"${file_base_name}.css",
"--no-color",
"--no-ie-compat",
"--verbose",
"--source-map=${file_base_name}.map",
],
@WraithKenny
WraithKenny / .htaccess
Created September 6, 2013 16:56
htaccess
php_value memory_limit 64M
php_value upload_max_filesize 8M
php_value post_max_size 8M
php_value max_execution_time 200
php_value max_input_time 200
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
@WraithKenny
WraithKenny / test-post-format.php
Created March 18, 2013 20:29
Test Experimental UI for Post Status
<?php
// Plugin Name: Post Format test
add_action( 'edit_form_after_title', 'test_post_format' );
function test_post_format() { ?>
<nav id="post-format-test" class="button-group post-format-select" style="white-space:normal"><a class="button active" data-wp-format="standard" href="?format=standard">Standard</a><a class="button" data-wp-format="aside" href="?format=aside">Aside</a><a class="button" data-wp-format="chat" href="?format=chat">Chat</a><a class="button" data-wp-format="gallery" href="?format=gallery">Gallery</a><a class="button" data-wp-format="link" href="?format=link">Link</a><a class="button" data-wp-format="image" href="?format=image">Image</a><a class="button" data-wp-format="quote" href="?format=quote">Quote</a><a class="button" data-wp-format="status" href="?format=status">Status</a><a class="button" data-wp-format="video" href="?format=video">Video</a><a class="button" data-wp-format="audio" href="?format=audio">Audio</a></nav>
<script>
jQuery(function($){
$('h2.nav-tab-wrapper.post-forma
<object
id="flashObj"
width="630"
height="534"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0"
>
<param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9?isVid=1" />
<param name="bgcolor" value="#FFFFFF" />
@WraithKenny
WraithKenny / gist:2937582
Created June 15, 2012 17:01
WP_DEBUG switch
define ( 'WP_DEBUG', false );
if ( WP_DEBUG ) {
define( 'WP_DEBUG_DISPLAY', false );
ini_set( 'display_errors', 1 ); // the above doesn't set this for you.
define( 'WP_DEBUG_LOG', true );
define( 'SCRIPT_DEBUG', true );
define( 'CONCATENATE_SCRIPTS', false );
define( 'COMPRESS_SCRIPTS', false );
define( 'COMPRESS_CSS', false );
@WraithKenny
WraithKenny / quick-get-wp.php
Created March 11, 2011 23:09
Gets WordPress latest and uncompress it.
<?php
exec('wget http://wordpress.org/latest.tar.gz');
exec('tar -xzvf latest.tar.gz');
?>