Posts Tagged ‘tutorial’

Dec
0

Online Guitar Resources

Online Guitar Resources

I’ve spent a lot of time on the ‘net over the past month or so reading, watching, and listening to tutorials on how to play the guitar.  I though that I’d post these “How to play the guitar” links for others out there that may be searching.  Let me know what you think.

Videos

Marty Schwartz from Guitarjams.com has a great channel on Youtube.  He goes over how to play songs of all levels and he updates frequently.  Check him out here.

Aaron Gallagher is almost entirely self taught (and he’s not even been playing all that long) he runs a great site called Free and Easy Guitar that has a HUGE how to video library.  Pick a song from the drop down list, and Aaron will teach you how to play it.

Justin Sandercoe is a London based guitarist who runs the site justinguitar.com.  His site differs from the others in that he has highly structured lessons that you can follow along with.  The site is donation based.  I’ve been spending a good bit of time making my way through his Basics Course.

I also just stumbled upon a site called Guitar Noise.  I’ve not used it too much yet, but it has many tutorials as well as guitar related news.

Tabs

The best site i have found for guitar tabs is hands down Ultimate Guitar their index seems to be near bottomless, so much so that I feel no need to reference any other.

Other Resources

And just to humble everyone out there – remember kids – John Mayer plays better than you with only one hand.

Feb
0

Connecting to Magento via XML-RPC

I have been trying off and on for about a week to get a connection made to Magento’s API via a PHP script.

Magento gives the following code snippet on their site, but I could not get it to work – souring the message boards didn’t really help either.  I am not sure if something was off with my installation instance or what.

  1. $client = new Zend_XmlRpc_Client(‘http://youmagentohost/api/xmlrpc/’);
  2. // If somestuff requires api authentification,
  3. // we should get session token
  4. $session = $client->call(‘login’, array(‘apiUser’, ‘apiKey’));
  5. $client->call(‘call’, array($session, ‘somestuff.method’, array(‘arg1′, ‘arg2′, ‘arg3′)));
  6. $client->call(‘call’, array($session, ‘somestuff.method’, ‘arg1′));
  7. $client->call(‘call’, array($session, ‘somestuff.method’));
  8. $client->call(‘multiCall’, array($session,
  9. array(
  10. array(‘somestuff.method’, ‘arg1′),
  11. array(‘somestuff.method’, array(‘arg1′, ‘arg2′)),
  12. array(‘somestuff.method’)
  13. )
  14. ));
  15. // If you don’t need the session anymore
  16. $client->call(‘endSession’, array($session));

After a bunch of trial and error – scouring the web etc – i was finally able to make a connection with the following script

<?php
ini_set("display_errors", 1);
error_reporting(E_ALL);
define("XMLRPC_DEBUG", 1);

require_once('../app/Mage.php');
$client = new Zend_XmlRpc_Client('http://www.domain.com/api/xmlrpc');

// If somestuff requires api authentification, we should get session token
$session = $client->call('login', array('user', 'key'));

echo "<pre>";
print_r($session);
echo "</pre>";

// If you don't need the session anymore
$client->call('endSession', array($session));
?>

one strange thing to note is the path to the API – with a trailing slash, i could not get this to work…’

I hope that this helps someone else out.

Jan
0

Sys Admin Stuff

things i’ve used recently: tar -zxvf file.tar.gz

mysql -u username -p password database_name < filename.sql

http://kb.mediatemple.net/questions/129/How+can+I+Backup+and+Restore+a+MySQL+database%3F

Jan
0

Media Temple Notes

You’ve configured open_basedir correctly to allow access to /usr/share/pear but to call the file correctly you can either call DB.php using the absolute path

/usr/share/pear/DB.php

or if you want to just use DB.php you will also need to modify include_path to use

/usr/share/pear

You can just include, include_path to the vhost where you added open_basedir. Something like

php_admin_value include_path “/usr/share/pear”

then run

/usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=domain.com
Here are step by step instructions, on how to add an include path for your (dv) Dedicated Virtual 3.5 Extreme.

http://kb.mediatemple.net/questions/514/(dv)+HOWTO%3A+Enable+PEAR%7B47%7DSet+open_basedir+and+include_path.

Also, you may need to modify your php.ini file.

Configuring the php.ini file on a DV requires the following.

1. Access to an SSH client.
(http://kb.mediatemple.net/article.php?id=016)
2. Basic knowledge of SSH commands
(http://kb.mediatemple.net/article.php?id=247)
3. And the root password.  Root access can easily be enabled using our Root Access and Developer Tools function in the Admin Section of the AccountCenter.

The most common parameters changed in the php.ini file are:

safe_mode
register_globals
max_upload_filesize
post_max_size
max_execution_time

Use the following command at the command prompt to start editing:

vi /etc/php.ini

If you are looking for a specific parameter and would like to go
straight there, type the following:

vi +/parameter /etc/php.ini

example: vi +/safe_mode /etc/php.ini

For more information on using the vi command, review kb article

http://kb.mediatemple.net/article.php?id=247

Sep
0

MacBook Pro Hard Drive Replacement

powered by WordPress Multibox Plugin v1.3.5

img 0092 150x150 MacBook Pro Hard Drive ReplacementSo I accidentally let a TV fall on my MacBook Pro last night – and not a light, modern, flat-panel TV, but a heavy ass old-school CRT TV.  When I tried to boot it after gravity played her evil trick on me, all i got was a flashing folder icon with a question mark in it.  I tried some tricks to get the machine to recognize the hard drive, all to no avail. I could hear the drive clicking but not spinning, and the TV did fall on the portion of the laptop where the hard drive lies, so I decided to try my hand at replacing the hard drive.  A trip to Best Buy and I had a 320GB hard drive in hand and a quick viewing of this video…and things seem to be on track. Ignore the awful music selection. If you’re crunched for time, watch this video instead…http://www.youtube.com/watch?v=rhNPchwhQoc&NR=1

Tomorrow I will try and re-install the OS, but the computer recognized the drive and allowed me to partition it, so I am not overly concerned. I anticipate that the re-install will go fairly smoothly – but I will post updates. This new drive will give me 200GB more space so maybe once this is all over with it will end up being a good thing.

Apr
0

Getting Root ID from embeded pages

powered by WordPress Multibox Plugin v1.3.5
wordpressicon hanttula2 Getting Root ID from embeded pages

For quite a while now I have been using the following script to show sub navigation on WordPress Sidebars. It utilizes the built in wp_list_pages function to show parent and child relationships on a sidebar (or where ever you choose to use it for that matter).

<?php

if($post->post_parent)
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); if ($children) { ?>  <ul> <?php echo $children; ?> </ul> <?php } ?>

I like that it is simple, and that it can be re-written to show items only if they are child pages of a specific parent, ie:

<?php
// find out what the top level page is

global $post;
if($post->post_parent) $parentPG = $post->post_parent; // page is a child
else $parentPG = $post->ID; // page has children
?>

<?php

// marketing

if($parentPG==7){

// show items if the parent id is 7
}elseif($parentPG==8){
// show items if the parent id is 8
}
?>

This works great when you only need to make it work with parent and child pages. Recently, however, I had the need to utilize this type of functionality on a project that required pages 3 levels deep (grandchildren?). After a bit of Googling, and searching through the WordPress Codex I realized that I was going to have to “roll my own” on this one. So here you go – there are probably better ways of doing this. If you know of one please let me know, but maybe this will help someone else searching for “wordpress list grandchildren”

<?php
// find out what the top level page is
global $post;
if($post->post_parent){
$parentPG = $post->post_parent; // page is a child

// check for grand children
$sql = "SELECT * FROM `".$wpdb->prefix."posts` WHERE ID=$parentPG";
$data = $wpdb->get_results($sql,ARRAY_A);

if(!empty($data[0][post_parent])) $parentPG=$data[0][post_parent];
}
else $parentPG = $post->ID; // page has children
?>

<?php

// marketing
if($parentPG==7){
// show stuff for parent 7
}elseif($parentPG==8){
// show stuff for parent 8
}
?>