Skip to content

Instantly share code, notes, and snippets.

View kevinruscoe's full-sized avatar
💻
Working

Kevin Ruscoe kevinruscoe

💻
Working
View GitHub Profile
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>My Theme</title>
<parent>Magento/luma</parent>
</theme>
.navbar-hoverable {
.dropdown {
&:hover {
.dropdown-menu {
display: block;
margin-top: 0;
}
}
}
}
@supports(display:grid) {
#recipes {
display: grid;
grid-template-columns: repeat(4, 1fr);
padding: 0;
grid-gap: 30px;
margin: 0 30px;
width: auto;
}
protected function updateQuantityRelative($item, $key, $value){
if (preg_match('/\-/', $value) == 1) {
$value = floatval(str_replace('-', '', $value));
if (($item[$key] - $value) > 0) {
$item[$key] -= $value;
}
} elseif (preg_match('/\+/', $value) == 1) {
$item[$key] += floatval(str_replace('+', '', $value));
} else {
# Include a redirect map, incase 301s are needed
# include /etc/nginx/conf.d/redirect-map.conf;
server {
listen 80;
server_name @@DOMAIN@@ www.@@DOMAIN@@;
root /var/www/vhosts/@@DOMAIN@@/public;
# Cache general assets for as long as possible
location ~* ^.+\.(ogg|ogv|eot|otf|woff|mp4|ttf|rss|atom|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|rtf)$ {
$cols: 12;
$gap: .5rem;
.css-grid {
display: grid;
grid-template-columns: repeat($cols, auto);
grid-gap: $gap $gap;
@for $col from 1 to ($cols+1) {
<?php
class API {
private $token;
private $tokenExpiry;
public function __construct()
{
$this->deserializeToken();
<template>
<ul id="People">
<Person v-for="(person, index) in people"
:name="person.name"
:age="person.age"
v-on:destroy="destroy"
></Person>
<?php
class NestedWordPressValetDriver extends WordPressValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
server {
listen 80;
server_name {DOMAIN} www.{DOMAIN} {IP_ADDR};
root /var/www/vhosts/{DOMAIN}/public;
include /etc/nginx/default.d/*.conf;
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off; log_not_found off; expires max;
}