Skip to content

Instantly share code, notes, and snippets.

View thinkstylestudio's full-sized avatar

Theron Smith thinkstylestudio

View GitHub Profile

OS X Preferences


#Disable window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

#Enable repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
if ( ! defined( 'WCS_DEBUG' ) ) {
define( 'WCS_DEBUG', true );
}
<?php
/*
Plugin Name: PageLines Security Patcher
Description: Blocks the recent exploits for legacy themes in the event you cant update the themes.
Version: 1.0
Author: PageLines
*/
class Fix_Pagelines_Legacy {
function __construct() {
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<?php
/**
* Includes extensions for Gravity Forms to SugarCRM and Hubspot
* The demo code with all fields is located at the bottom of the file
* for future reference so we don't have to hunt it down later
*
* Don't forget to read the link on how to finish off the SugarCRM
* integration. I'll blog about it eventually so it's all in one
* spot.
*
var page = require('webpage').create(),
address, output, size;
if (phantom.args.length < 2 || phantom.args.length > 3) {
console.log('Usage: rasterize.js URL filename');
phantom.exit();
} else {
address = phantom.args[0];
output = phantom.args[1];
page.viewportSize = { width: 1280, height: 1024 };
#!/bin/bash
homebrew_packages=(
freetype
jpeg
libpng
gd
zlib
openssl
unixodbc

Ruby, RVM and Mountain Lion

Key problems

Mountain Lion (10.8) has three main difference compared to Lion (10.7):

  • XCode 4.4 does not install Command Line Tools by default
  • X11 isn't available anymore
  • The installed version of OpenSSL has some bugs

How to work around

/*
* matches the student academic profile with their school in the Gravity Form
* it uses a modified version of the save function from the relations post type
* plugin that is meant to work with the GF form of this specific ID
*/
add_action( 'gform_post_submission_4', 'sfn_tan_make_post_relation', 10, 2);
function sfn_tan_make_post_relation( $entry, $form, $custom_id = 0, $object_ids = array(), $post_types = array(), $append = true ) {
global $wpdb;
<?php
// add the following to your functions file or similar
define( 'FUBLO_GF_PROFILE', 1 ); // define the ID number of your profile form.
// ============================================================= PROFILE EDITING
/**
* These are the user metadata fields, with their names and the data about them.