Skip to content

Instantly share code, notes, and snippets.

View jasperf's full-sized avatar
🏠
Working from home

Jasper Frumau jasperf

🏠
Working from home
View GitHub Profile
@jasperf
jasperf / laravel-setup.sh
Last active April 29, 2017 05:50
Set up Laravel PHP from scratch using Valet or Homestead for local development. If you use Homestead skip Valet stuff and do Homestead stuff
#Composer dependency manager
#https://getcomposer.org/download/
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
#https://getcomposer.org/doc/00-intro.md#globally
mv composer.phar /usr/local/bin/composer
#http://stackoverflow.com/questions/25373188/laravel-installation-how-to-place-the-composer-vendor-bin-directory-in-your#25373254
echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc
@jasperf
jasperf / cf7.css
Last active June 9, 2022 09:34 — forked from codehandling/cf7.css
Contact Form 7 Styles for basic CSS styling of the form. Form is responsive and has nice rounded corners. For labels and placeholders you need to edit the form in CF7 https://imwz.io/contact-form-7-css-boilerplate/
/*
** Contact Form 7 basics
**
**/
/* Form width and border */
.wpcf7 {
text-align: left;
width: 90%;
@jasperf
jasperf / gist:9fc605a726349b27a9bebf9bb999be94
Created February 15, 2017 08:14
featured product slider function
function featured_products_slider()
{
$args = array(
'post_type' => 'product',
'meta_key' => '_featured',
'meta_value' => 'yes',
'post_status' => 'publish'
);
@jasperf
jasperf / woocommerce-featured-products.php
Created February 15, 2017 06:39 — forked from Jeff2Ma/woocommerce-featured-products.php
woocommerce featured products
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<reference name="notification_toolbar">
<action method="setTemplate">
<template>megamenu/toolbar.phtml</template>
</action>
</reference>
<reference name="head">
<action method="addJs"><file>megamenu/jscolor/jscolor.js</file></action>
@jasperf
jasperf / block-name.sh
Created February 4, 2017 15:46
grep -rnw 'app/' -e "<block name="
app/design/adminhtml/default/default/layout/megamenu.xml:127: <block name="content">
app/design/adminhtml/default/default/layout/catalog.xml:287: <block name="category.tree" type="adminhtml/catalog_category_tree" template="catalog/category/tree.phtml" />
app/design/adminhtml/default/default/layout/catalog.xml:290: <block name="category.edit" type="adminhtml/catalog_category_edit" template="catalog/category/edit.phtml" />
app/design/adminhtml/default/default/layout/catalog.xml:299: <block name="product.composite.fieldset.options" type="adminhtml/catalog_product_composite_fieldset_options" template="catalog/product/composite/fieldset/options.phtml">
app/design/adminhtml/default/default/layout/cms.xml:80: <block name="wysiwyg_images.js" type="adminhtml/cms_wysiwyg_images_content" template="cms/browser/js.phtml" />
app/design/adminhtml/default/default/layout/cms.xml:81: <block name="wysiwyg_images.tree" type="adminhtml/cms_wysiwyg_images_tree" templat
<?xml version="1.0"?>
<!--
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
@jasperf
jasperf / cms.xml
Last active February 4, 2017 13:58
<?xml version="1.0"?>
<!--
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
<?xml version="1.0"?>
<!--
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
@jasperf
jasperf / list.phtml
Created February 4, 2017 12:20
Magento Catalog Template file app/design/frontend/rwd/default/template/catalog/product/list.phtml
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php