Skip to content

Instantly share code, notes, and snippets.

@masugadesign
masugadesign / gist:f3cb1d6663265f123712
Last active August 29, 2015 14:16
ee-relationship-example
{!-- I should note that this entries loop IS inside a Switchee case
{prod_manufacturer} - the relationship field
====================================================================================== --}
{exp:channel:entries
channel="products"
url_title="{segment_2}"
}
@masugadesign
masugadesign / masuga-design-internships.md
Last active August 29, 2015 14:16
PHP & front-end developer interns needed at Masuga Design

PHP & Front-End Developer Interns

What We Need

Masuga Design needs PHP and front-end developer interns to join us in doing excellent work from our office in downtown Grand Rapids, MI.

A PHP developer will develop primarily with ExpressionEngine (PHP-based CMS) for client work, and in Laravel (PHP framework) for internal projects.

A front-end developer will work with HTML and CSS (using SCSS and Grunt) and will get familiar with front-end frameworks like Foundation.

# Does not include 'cp', which isn't present on the CP landing page.
# The SCRIPT_NAME will output 'mysystemdir/index.php' when in the control panel.
# I always set the system folder as a variable at the top of our config, because
# it is used in a few places.
$system_folder = 'mysystemdir';
$config['show_profiler'] = (strpos($_SERVER['SCRIPT_NAME'], $system_folder) !== false) ? 'n' : 'y';

devot:ee Outage

Friday September 12, 2014 - 3:06 PM

The host fixed a server time issue and repaired a number of tables. We can now add items to the cart and make purchases.

Friday September 12, 2014 - 2:23 PM

EngineHosting had a major service interruption yesterday, which took devot-ee.com down all day. At some point in the wee hours last night, the site came back up, so now you can at least do a little research - but not much else.

@masugadesign
masugadesign / Orders API
Created January 21, 2011 20:29
Developers get purchased item info in JSON format.
<?php
$username = ""; //enter your username here
$password = ""; //enter your password here
$start_dt = "2011-01-01"; start date in YYYY-MM-DD format
$end_dt = "2011-12-31"; end date in YYYY-MM-DD format
// Create the post string
$post_string = "username=".$username."&password=".$password."&start_dt=".$start_dt."&end_dt=".$end_dt;
// Process
@masugadesign
masugadesign / ee1_config.php
Created September 22, 2010 14:14
Sample EE1 config.php file
<?php
if ( ! defined('EXT')){
exit('Invalid file request');
}
$conf['app_version'] = "169";
$conf['license_number'] = "1234-1234-1234-1234";
$conf['debug'] = "1";
$conf['install_lock'] = "1";
@masugadesign
masugadesign / quickkill
Created August 25, 2010 18:01
Relaunch Quicksilver if it's non-responsive
#!/bin/sh
killall Quicksilver
open /Applications/Quicksilver.app
<?php
/*
EE2 hidden configuration variables
Last updated: Jun 20 2010
Obtain this list by putting print_r($this->EE->config->config); on a PHP-enabled template.
See: http://eeinsider.com/tips/view/config-overrides-for-ee-1-and-2/
*/
#!/usr/bin/env php
<?php
// This command simply prints out the serialized data in a readable printed array format
// Found on a blog via a google search
// @see http://top-frog.com/2009/08/28/quickly-unserialize-data-in-textmate/
$data = unserialize(file_get_contents('php://stdin'));
print_r($data);
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
{if segment_1 == "search" && segment_2 != ""}
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-000000-1");
pageTracker._initData();