Skip to content

Instantly share code, notes, and snippets.

View jconroy's full-sized avatar

Jason Conroy jconroy

  • Automattic
  • Australia
View GitHub Profile
@ryanscherler
ryanscherler / php-openssl.md
Last active August 16, 2018 20:06
Use Homebrew PHP with OpenSSL instead of SecureTransport
// Sample event data for a proxy request
// {
// "resource": "Resource path",
// "path": "Path parameter",
// "httpMethod": "Incoming request's method name"
// "headers": {Incoming request headers}
// "queryStringParameters": {query string parameters }
// "pathParameters": {path parameters}
// "stageVariables": {Applicable stage variables}
// "requestContext": {Request context, including authorizer-returned key-value pairs}
@curtismcmullan
curtismcmullan / setup_selenium.sh
Last active May 2, 2023 22:56
Setup Selenium Server on Ubuntu 14.04
#!/bin/bash
# Following the guide found at this page
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html
echo "\r\nUpdating system ...\r\n"
sudo apt-get update
# Create folder to place selenium in
@michaellouieloria
michaellouieloria / gist:f2ee272d1709a0e80f71
Last active August 4, 2019 12:10
Phantomjs in Facebook PHP webdriver
Use phantomjs. Start it:
$ phantomjs --webdriver=127.0.0.1:8910
Use:
require_once('lib/__init__.php');
$host = '127.0.0.1:8910';
$capabilities = array(
WebDriverCapabilityType::BROWSER_NAME => 'phantomjs',
@davidsneal
davidsneal / html-share-buttons.html
Last active December 12, 2023 13:18
HTML Share Buttons
<!-- I got these buttons from simplesharebuttons.com -->
<div id="share-buttons">
<!-- Buffer -->
<a href="https://bufferapp.com/add?url=https://simplesharebuttons.com&amp;text=Simple Share Buttons" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/buffer.png" alt="Buffer" />
</a>
<!-- Digg -->
<a href="http://www.digg.com/submit?url=https://simplesharebuttons.com" target="_blank">
@DevinWalker
DevinWalker / woocommerce-optimize-scripts.php
Last active January 8, 2024 13:24
Only load WooCommerce scripts on shop pages and checkout + cart
/**
* Optimize WooCommerce Scripts
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
*/
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );
function child_manage_woocommerce_styles() {
//remove generator meta tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@julionc
julionc / 00.howto_install_phantomjs.md
Last active April 26, 2024 09:13
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@DevinWalker
DevinWalker / gravity-forms_bootstrap
Last active November 28, 2023 20:35
Gravity Forms Twitter Bootstrap CSS Styles Turn OFF Gravity Forms CSS Turn On HTML5 See: http://roots.io/style-gravity-forms-with-bootstrap/
/* ------------------------------------
Gravity Forms
---------------------------------------*/
.gform_wrapper ul { padding-left: 0; list-style: none }
.gform_wrapper li { margin-bottom: 15px }
.gform_wrapper form { margin-bottom: 0 }
@spigists
spigists / new_gist_file.css
Created October 2, 2013 16:16
Bootstrap 3 styles for Gravity Forms, make sure that in Forms > Settings you have Output CSS set to No and Output HTML5 set to Yes
.gform_wrapper ul {
padding-left: 0;
list-style: none; }
.gform_wrapper li {
margin-bottom: 15px; }
.gform_wrapper form {
margin-bottom: 0; }