Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
unload() {
kextstat | grep "org.virtualbox.kext.VBoxUSB" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxUSB
kextstat | grep "org.virtualbox.kext.VBoxNetFlt" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetFlt
kextstat | grep "org.virtualbox.kext.VBoxNetAdp" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetAdp
kextstat | grep "org.virtualbox.kext.VBoxDrv" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxDrv
}
load() {

First install Virtualbox

  1. sudo nano /etc/apt/sources.list.d/virtualbox.list
  2. Add deb http://download.virtualbox.org/virtualbox/debian raring contrib non-free
  3. wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
  4. sudo apt-get update
  5. sudo apt-get install dkms unzip
  6. sudo apt-get install virtualbox-4.2 --no-install-recommends
  7. wget http://download.virtualbox.org/virtualbox/4.2.12/Oracle_VM_VirtualBox_Extension_Pack-4.2.12.vbox-extpack
  8. sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.2.12.vbox-extpack
#!/usr/bin/env ruby
require "rubygems"
require "spidr"
require "open-uri"
=begin
= CSS snowball
Rolls through your site, picking up style attributes and making you
a new stylesheet. Once you've got your stylesheet, run it through
<?php
/**
* Proof of concept for how to add new fields to nav_menu_item posts in the WordPress menu editor.
* @author Weston Ruter (@westonruter), X-Team
*/
add_action( 'init', array( 'XTeam_Nav_Menu_Item_Custom_Fields', 'setup' ) );
class XTeam_Nav_Menu_Item_Custom_Fields {
static $options = array(
<?php
/**
* Customize Image Reloaded Class
*
* Extend WP_Customize_Image_Control allowing access to uploads made within
* the same context
*
*/
class My_Customize_Image_Reloaded_Control extends WP_Customize_Image_Control {
/**

Comment Blacklist for WordPress

Sometimes a simple solution is a better solution.

Over the past couple of years, I have identified over 5,600 phrases, patterns, and keywords commonly used by spammers and comment bots in usernames, email addresses, link text, and URIs. This blacklist is still a work in progress and there is certainly room for optimization. Suggestions are always appreciated.

How Do I Use It?

Copy the list of keywords, paste it into the Comment Blacklist field of your WordPress Discussion Settings panel, and click the “Save Changes” button.

@bryanwillis
bryanwillis / admin.css
Last active December 27, 2015 03:49 — forked from anonymous/admin.css
#adminmenu div.wp-menu-image:before {
color: #999;
}
#adminmenu div.wp-menu-image:before:hover {
color: #FFF !important;
}
#adminmenu div.wp-menu-image:hover:before {
color: #FFF !important;
<nav id="globalheader" class="apple globalheader-js svg globalheader-loaded globalheader-loaded" style="background-attachment: scroll, scroll, scroll, scroll; background-clip: border-box, border-box, border-box, border-box; background-color: rgba(0, 0, 0, 0); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgba(0, 0, 0, 0.2)), color-stop(0.05, rgba(0, 0, 0, 0)), color-stop(0.97, rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.45098))), -webkit-gradient(linear, 0 0, 100% 0, from(rgba(0, 0, 0, 0.2)), color-stop(0.002, rgba(0, 0, 0, 0)), color-stop(0.998, rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.2))), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA9QAAAAkCAMAAABfcIIyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHVQTFRFAAAA%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2

Convert (simple) SWF to PDF

In SWFTools a programs called gfx2gfx is available to do this task, but it's not officially available precompiled.

It can convert SWF, PDF or image to SWF, PDF, ebook or image.

Requirements

To use it, you need pdflib with downloadable sources or installable via macport sudo port install pdflib.

<?php
/**
* Plugin Name: MU plugins subdirectory loader
* Plugin URI: https://gist.github.com/lavoiesl/6302907
* Description: Enables the loading of plugins sitting in mu-plugins (as folders)
* Version: 0.1
* Author: github@lavoie.sl
* Author URI: http://blog.lavoie.sl/
*