Skip to content

Instantly share code, notes, and snippets.

View lehelmatyus's full-sized avatar

Árpád Lehel Mátyus lehelmatyus

  • Urban Insight Inc.
  • Los Angeles
View GitHub Profile
@lehelmatyus
lehelmatyus / wp-config.php
Created February 2, 2017 02:33
wp-config.php
if (isset($_SERVER['PANTHEON_ENVIRONMENT']) &&
$_SERVER['PANTHEON_ENVIRONMENT'] === 'live') {
if ($_SERVER['HTTP_HOST'] == 'lehelmatyus.com' ||
$_SERVER['HTTP_HOST'] == 'live-lehelmatyus.gotpantheon.com') {
header('HTTP/1.0 301 Moved Permanently');
header('Location: http://www.lehelmatyus.com'. $_SERVER['REQUEST_URI']);
exit();
}
}
@lehelmatyus
lehelmatyus / custom-mixins.sass
Last active January 11, 2017 22:57
custom-mixins.less
// GHJ CSS Classes
// ------------ Backgrounds--------------------------------
gray_row // set background grey #EFF1F4
white_row // set background white #fff
cream_row /*or*/ creme_row// set background to tan/cream #DEDBCC
olive_row // set background to light cream #90af69
green_row // set background to light cream #018349
blue_row // set background to light cream #283A64
.stock.out-of-stock::after {
content: "Available on request";
left: 0;
position: absolute;
text-indent: 0;
top: 0;
}
.stock.out-of-stock {
position: relative;
@lehelmatyus
lehelmatyus / functions.php
Last active June 30, 2016 17:29
Modify WooCommerce In stock text
<?php
function inastheme_get_availability( $availability, $_product ) {
global $product;
$stock = $product->get_total_stock();
if ( $_product->is_in_stock() ) $availability['availability'] = __('Limitierte Edition' . $stock . ' erhältlich', 'woocommerce');
if ( !$_product->is_in_stock() ) $availability['availability'] = __('SOLD OUT', 'woocommerce');
@lehelmatyus
lehelmatyus / paper-js-tutorial-1-5.html
Created June 17, 2016 21:42
paper-js-tutorial-1-5.html
<script src="bower_components/webcomponentsjs/webcomponents-lite.min.js">
@lehelmatyus
lehelmatyus / paper-js-tutorial-1-4.html
Created June 17, 2016 20:36
paper-js-tutorial-1-4.html
<paper-toolbar>
<paper-icon-button icon="menu" on-tap="menuAction"></paper-icon-button>
<div class="title">UI App</div>
<paper-icon-button icon="more-vert" on-tap="moreAction"></paper-icon-button>
</paper-toolbar>
<div class="">
<template is="dom-bind">
<paper-input label="Enter your name" value="{{name::input}}"></paper-input>
<br>
@lehelmatyus
lehelmatyus / paper-js-tutorial-1-3.html
Created June 17, 2016 20:34
paper-js-tutorial-1-3.html
<link rel="import" href="../../bower_components/iron-icons/iron-icons.html">
<link rel="import" href="../../bower_components/paper-toolbar/paper-toolbar.html">
<link rel="import" href="../../bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="../../bower_components/paper-input/paper-input.html">
@lehelmatyus
lehelmatyus / paper-js-tutorial-1-2.html
Last active June 17, 2016 20:35
paper-js-tutorial-1-2.html
bower install --save PolymerElements/paper-toolbar
bower install --save PolymerElements/paper-icon-button
@lehelmatyus
lehelmatyus / paper-js-tutorial-1-1.html
Created June 17, 2016 20:32
paper-js-tutorial-1-1.html
bower.json. Configuration file
bower_components/. Project dependencies.
index.html. Entrypoint of the app.
src/ui-app/ui-app.html. Source code for main element.
test/ui-app/ui-app_test.html. Tests for main element.