Skip to content

Instantly share code, notes, and snippets.

do you even scale, bro?

Antonio Cosentino antoniocosentino

do you even scale, bro?
Block or report user

Report or block antoniocosentino

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
View iterate object
const map = new Map([[1, 'one'][2, 'two']])
map.forEach(val => {
antoniocosentino / styla-embed
Last active Nov 1, 2018
Snippets to embed Styla Areas
View styla-embed
<!-- embed a single area -->
<div id="stylaMagazine" data-area="fashion"></div>
<script src="" async="" type="text/javascript" xml="space"></script>
<!-- end -->
<!-- embed multiple areas in the same page -->
<!-- this goes in <head> -->
<script src="" async type="text/javascript"></script>
//connect to VPN
wg-quick up prod
//turn off
wg-quick down prod
antoniocosentino / index.tpl
Last active May 3, 2018
Shopware5 template customization for Dirndltopia (fixes issue with mobile menu shown on desktop). Replace here: /shopware5/engine/Shopware/Plugins/Local/Frontend/StylaSEO/Views/frontend/magazin/index.tpl
View index.tpl
{extends file='parent:frontend/custom/index.tpl'}
{block name='frontend_index_header'}
{include file='frontend/magazin/header.tpl'}
{* Sidebar left *}
{block name='frontend_index_content_left'}
antoniocosentino / index.tpl
Last active Feb 2, 2018
Plugin customization to hide the left sidebar element. This will replace this file: /shopware5/engine/Shopware/Plugins/Local/Frontend/StylaSEO/Views/frontend/magazin/index.tpl
View index.tpl
{extends file='parent:frontend/custom/index.tpl'}
{block name='frontend_index_header'}
{include file='frontend/magazin/header.tpl'}
{block name="frontend_index_content_left"}
#gLeft { display:none; }
antoniocosentino / postDispatch.php
Created Feb 1, 2018
shopware5/engine/Shopware/Plugins/Local/Frontend/StylaSEO/Controllers/Frontend/Magazin.php if CURL request to SEO API is creating issues replace postDispatch() with this
View postDispatch.php
public function postDispatch(){
$type = $this->_feed_params['type'];
$js_include = StylaUtils::getJsEmbedCode($this->_username, $this->_snippet_url);
$ret = null;
$path = StylaUtils::getCurrentPath($this->_base_dir);
//disabling call to SEO API
//$ret = StylaUtils::getRemoteContent($this->_username, $path, $this->_url_query_params, $this->_source_url);
antoniocosentino / kprint.php
Last active Feb 1, 2018
The most simple, stupid and useful PHP function in the world.
View kprint.php
function kprint($string){
echo '<pre>';
echo '</pre>';
antoniocosentino /
Last active Oct 9, 2018 — forked from hofmannsven/
Git Cheat Sheet

git help


Initialize Git: git init

Get everything ready to commit:

You can’t perform that action at this time.