Skip to content

Instantly share code, notes, and snippets.

View theskillwithin's full-sized avatar
😝
yay

Austin Peterson theskillwithin

😝
yay
View GitHub Profile
<?php
function Amazon($ASIN) {
//$this->_ASIN = $ASIN;
$url = "http://www.amazon.com/dp/" . $ASIN;
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// grab URL and pass it to the browser
var highlightCurrentNavItem = {
getEachNavItem: function() {
hrefId: [];
$('nav li a').each(function() {
var that = $(this);
highlightCurrentNavItem.hrefId.push(that.attr('href'));
});
},
scroll: function() {
var current;
$(document).ready(function() {
var hrefId = [];
$('#fixed-nav li a').each(function() {
var that = $(this);
hrefId.push(that.attr('href'));
});
$('#fixed-nav a[href$=#home]').css('color','red');
$('.topbarbg').css('opacity', '1');
var current;
$(document).scroll(function() {
@theskillwithin
theskillwithin / highlightCurrentNavItem.js
Created April 5, 2016 22:46
on a one page site this can be used to highlight the nav item of the current page.
var highlightCurrentNavItem {
hrefId: [];
current: var;
getEachNavItem: function() {
$('nav li a').each(function() {
var that = $(this);
hrefId.push(that.attr('href'));
});
},
Scroll: function() {
vagrantfile:
target: local
vm:
provider:
local:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
box_version: '0'
chosen_virtualizer: virtualbox
virtualizers:
vagrantfile:
target: local
vm:
provider:
local:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
box_version: '0'
chosen_virtualizer: virtualbox
virtualizers:
@theskillwithin
theskillwithin / exception.log
Created April 4, 2016 16:37
when adding to cart
$ tail -f var/log/exception.log
2016-04-04T16:35:57+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Page_Block_Html_CookieNotice' in /var/www/public_html/app/Mage.php:594
Stack trace:
#0 /var/www/public_html/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /var/www/public_html/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('page/html_cooki...', Array)
#2 /var/www/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('page/html_cooki...', 'global_cookie_n...')
#3 /var/www/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('page/html_cooki...', 'global_cookie_n...')
#4 /var/www/public_html/app/code/local/Smartwave/All/Model/Core/Layout.php(40): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /var/www/public_html/app/code/core/Mage/Core/
@theskillwithin
theskillwithin / .phpstorm.meta.php
Created April 4, 2016 03:08 — forked from barryvdh/.phpstorm.meta.php
Laravel PhpStorm Meta file
<?php
namespace PHPSTORM_META {
/**
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
* Generated on 2015-06-22.
*
* @author Barry vd. Heuvel <[email protected]>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
@theskillwithin
theskillwithin / config.yaml
Created April 4, 2016 00:46
Magento2 Apache PHP 7
vagrantfile:
target: local
vm:
provider:
local:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
box_version: '0'
chosen_virtualizer: virtualbox
virtualizers:
@theskillwithin
theskillwithin / config.yaml
Created April 3, 2016 06:49
Magento 2 vagrant puphpet nginx php7
vagrantfile:
target: local
vm:
provider:
local:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
box_version: '0'
chosen_virtualizer: virtualbox
virtualizers: