Skip to content

Instantly share code, notes, and snippets.

🖥
Magento

Navarr Barnier navarr

🖥
Magento
Block or report user

Report or block navarr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@navarr
navarr / bashrc
Created Nov 7, 2017
Magento Helper Functions
View bashrc
# Clear & regenerate CSS
refreshcss() {
find /var/www/Magento/pub/static/frontend -name "*.css" -type f -delete
find /var/www/Magento/pub/static/_cache -name "*.css" -type f -delete
find /var/www/Magento/var/view_preprocessed -name "*.less" -type f -delete
find /var/www/Magento/var/view_preprocessed -name "*.css" -type f -delete
/var/www/Magento/bin/magento setup:static-content:deploy -t SDBullion/twentyseventeen --no-html-minify
/var/www/Magento/bin/magento cache:flush full_page
date
}
View launcher_log.txt
[0506/163653:INFO:LauncherAppBrowser.cpp(24)] Work dir is C:\Users\Navarr\AppData\Roaming\.minecraft
[0506/163653:INFO:ClientHandler.cpp(182)] Creating launcher window.
[0506/163653:INFO:LauncherAppRenderer.cpp(110)] Javascript bridge extended.
[0506/163655:INFO:ClientHandler.cpp(846)] Preferences / startup: Read preferences
[0506/163655:INFO:ClientHandler.cpp(846)] Preferences: Wrote preferences
View README.md

Usage:

  • Add the mixin somewhere
  • Duplicate the mixin instructions into your require-js
  • Form XML:
  <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
      <!-- ... -->
@navarr
navarr / setup_privkey.php
Created Jun 6, 2016
Properly format a string into a Private Key
View setup_privkey.php
#!/usr/local/bin/php
<?php
// Does the environment variable exist?
if (!isset($_ENV['ID_RSA'])) {
error_log("ID_RSA Environment Variable not set");
return;
}
$id_rsa = $_ENV['ID_RSA'];
View better-or-worse.php
<?php
array_walk($attributes, function($definition, $attribute) use ($defaults, $catalog) {
$definition = array_merge($defaults, $definition);
$catalog->addAttribute('catalog_product', $attribute, $definition);
});
foreach($attributes as $definition => $attribute) {
$definition = array_merge($defaults, $definition);
$catalog->addAttribute('catalog_product', $attribute, $definition);
View BlockMail.md

I have no idea how the blockchain works, but I think it'd be a great place for storage of distributed, encrypted, easily accessible mail.

Step 1 - Registration

An entry goes into the blockchain with the desired address (this is a username). The earliest entry for each desired address is the only one that is legitimate.

With this entry is stored a public key. Imagine the following psuedo-structure:

{ "type": "registration",

View google-logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@navarr
navarr / PATCH_SUPEE-6285-Part2_CE_1.9.1.1_v1-2015-07-09-08-27.sh
Created Jul 9, 2015
Separation of SUPEE-6285 v1 and v2 so that you can just apply "Part 2"
View PATCH_SUPEE-6285-Part2_CE_1.9.1.1_v1-2015-07-09-08-27.sh
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""
@navarr
navarr / template\page\html\breadcrumbs.phtml
Last active Apr 30, 2019
Magento Semantic Breadcrumbs
View template\page\html\breadcrumbs.phtml
<?php
if (empty($crumbs) || !is_array($crumbs)) {
return;
}
$_crumbItems = array();
$_crumbCount = 1;
$_crumbTotal = count($crumbs);
View designer.html
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../paper-toast/paper-toast.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-leaderboard.html">
<polymer-element name="my-element">
<template>
<style>
You can’t perform that action at this time.