Skip to content

Instantly share code, notes, and snippets.

View drmmr763's full-sized avatar

Chad Windnagle drmmr763

View GitHub Profile
@drmmr763
drmmr763 / rename-images.php
Created September 9, 2014 20:12
Rename K2 images using their file name structure
<?php
/*
* Author Chad Windnagle
* Handy script for renemaing k2 item images
* useful for when you've integrated two k2 databases and had colliding item IDs
* lets you batch rename tons of file names with K2s md5 naming strategy
*
*/
@drmmr763
drmmr763 / japp-user.php
Created September 3, 2014 01:28
Japp user
<?php
$app = JFactory::getApplication('site');
$app->initialise();
$JUser = JFactory::getUser();
var_dump($JUser);
exit();
@drmmr763
drmmr763 / career.md
Last active August 29, 2015 14:05
My career thus far

My career

As I look back on my life I can see how my hobbies and fascinations lead me to be doing what I do now. I've always had a fascination with technology, specifically technology that allowed for communication.

As a youngster (age 10-ish) I learned about this technology "Amateur Radio" (aka: ham radio). Its an old technology that's been around forever, and it allowed anyone to communicate with people with a transmitter and receiver. I was given a receiver as a young kid and played around with it, listening in on conversations other people were having.

A few years after that I actually invested in some "CB Radio" equipment. That's what trucker's used to communicate. I would ride around in the car with my CB unit and listen to the truckers and even try to talk to them.

Years later as a teenager the internet made its way into our house and I was introduced to forums and message boards. More forms of communication with people I'd never met, but I found it so very intriguing. My fascination grew an

@drmmr763
drmmr763 / hosts
Last active August 29, 2015 14:03
virtual host example
location: /private/etc/hosts
## localhosts
127.0.0.1 solo.local
127.0.0.1 www.solo.local
127.0.0.1 jissues.local
127.0.0.1 www.jissues.local
127.0.0.1 magento.local
127.0.0.1 www.magento.local
<?php
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
// latlng
$latitude = JRequest::getString('tbl_locations___lat');
$longitude = JRequest::getString('tbl_locations___long');
@drmmr763
drmmr763 / virtuemart.php
Created June 18, 2014 21:19
why i hate virtuemart
<?php
foreach ($this->product->customfieldsSorted['normal'] as $field) {
if ( $field->is_hidden ) //OSP http://forum.virtuemart.net/index.php?topic=99320.0
continue;
if ($field->display) {
if($field->virtuemart_custom_id == 3) {
$Dimension = $field->custom_value;
} else if($field->virtuemart_custom_id == 4) {
$Graphs = $field->custom_value;
@drmmr763
drmmr763 / retailerlookup.js
Created June 17, 2014 22:47
Geocoding Script
/**
* Created by Chad Windnagle on 6/15/14.
*/
// kick off the map load
google.maps.event.addDomListener(window, 'load', pageMapLoad);
// add watcher to the form submit
window.addEventListener('submit', formSubmit, false);
@drmmr763
drmmr763 / geocodeZipcode.js
Created June 17, 2014 01:22
Pass anonymous function result to parent function?
/*
* Takes a zipcode in string format
* Sends it to Google Maps API
* Returns an object containing latitude & longitude
*/
function geocodeZipcode(zip)
{
var geocodeOptions =
{
<div style="float:left; width: 200px; padding: 10px;border: 2px solid #efefef">
<p> the contents of the module </p>
</div>
<div class="clear"></div>
@drmmr763
drmmr763 / markup.html
Created June 13, 2014 20:03
Strangeness
<header>
<!-- the dimensions of this div will be 220 x 77px -->
<div class="logo-normal">
<a href="#">
<img src="logo.png" />
</a>
</div>
<!-- the dimensions of this div will be 220 x 82px -->
<div class="logo-werid">