Skip to content

Instantly share code, notes, and snippets.

View gseilheimer's full-sized avatar

Gilbert Seilheimer gseilheimer

View GitHub Profile
@gthln
gthln / gist:8401080
Created January 13, 2014 14:23
Install Composer on Managed Hosting at Domainfactory

Install Composer on Managed Hosting at Domainfactory

Step 1:

Log in to your Managed Hosting Server via SSH

Step 2:

Add these two lines to .bashrc:

@irazasyed
irazasyed / Install Composer using MAMP's PHP.md
Last active April 2, 2024 18:45
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

@kkirsche
kkirsche / Install Composer to use MAMP's PHP.md
Last active January 30, 2024 02:30
How to install Composer globally using MAMP's PHP

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line:

@adamharley
adamharley / random-image-widget.js
Created August 23, 2011 16:36
WP AJAX random image widget
jQuery(document).ready(function($) {
$.post(ajaxurl, {action:'random_image_widget'}, function(feedback){
image = jQuery.parseJSON(feedback);
img = $('<img src="'+image.thumb+'" />');
$('.widget_equesrandomimagewidget').append(img);
$(img).wrap('<a href="'+image.full[0]+'" width="'+image.full[1]+'" height="'+image.full[2]+'"></a>');
Shadowbox.setup(img.parent());
});
});