Example extension: gmp on a MAMP PRO with PHP 5.6.27 installation. For other versions it's just replacing the php version in the paths. Steps below are tested on MacOS Sierra (10.12.2).
Install Brew and MAMP PRO.
#!/usr/bin/env bash | |
echo "M2 - Deploy Static Content $1/$2 🚀" | |
rm -rf var/view_preprocessed/pub/static/frontend/$1/$2 | |
rm -rf var/view_preprocessed/source/frontend/$1/$2 | |
grunt exec:$2 |
#!/usr/bin/env bash | |
folderName=${PWD##*/} | |
magentoUser="MAGENTO_PUBLIC_KEY" | |
magentoPassword="MAGENTO_SECRET_KEY" | |
n98-magerun2.phar install --dbHost="localhost" --dbUser="root" --dbPass="root" --dbName="${folderName}" --installationFolder="magento-folder" --installSampleData=yes --baseUrl="http://${folderName}.test/" | |
mv magento-folder/* . |
jQuery(function($){ | |
var header = document.querySelector('header.page-header .header.content'), | |
panel = document.querySelector('header.page-header .panel'), | |
$panel = jQuery(panel), | |
$header = jQuery(header), | |
headerContainer = document.querySelector('header.page-header'), | |
$headerContainer = jQuery(headerContainer), | |
lastScroll = 0, | |
upSign = -1, |
<reference name="head"> | |
<block type="core/text" name="custom_css"> | |
<action method="setText"> | |
<text><![CDATA[ | |
<style type="text/css"> |
#include <iostream> | |
#include <stdio.h> | |
#include "opencv2/highgui/highgui.hpp" | |
int main( int argc, const char** argv ) { | |
cvNamedWindow("Example2", CV_WINDOW_AUTOSIZE); | |
CvCapture* capture = cvCreateFileCapture( argv[1] ); | |
#include <iostream> | |
#include <stdio.h> | |
#include "opencv2/highgui/highgui.hpp" | |
int main( int argc, const char** argv ) { | |
IplImage* img = cvLoadImage( argv[1] ); | |
cvNamedWindow("Example1", CV_WINDOW_AUTOSIZE); | |
cvShowImage("Example1", img); | |
cvWaitKey(0); |
// returns an array of localStorage items in key/value pairs based on a query parameter | |
// returns all localStorage items if query isn't specified | |
// query can be a string or a RegExp object | |
function findLocalItems (query) { | |
var i, results = []; | |
for (i in localStorage) { | |
if (localStorage.hasOwnProperty(i)) { | |
if (i.match(query) || (!query && typeof i === 'string')) { | |
value = JSON.parse(localStorage.getItem(i)); |
<?php | |
/** | |
* WordPress class - Manages the WordPress XML file and gets all data from that. | |
*/ | |
class Wordpress | |
{ | |
public static $wpXML; |
Example extension: gmp on a MAMP PRO with PHP 5.6.27 installation. For other versions it's just replacing the php version in the paths. Steps below are tested on MacOS Sierra (10.12.2).
Install Brew and MAMP PRO.
https://bitbucket.org/USERNAME/REPONAME/get/COMMITCODE.tar.gz