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 => {
console.log(val)
}
@antoniocosentino
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="https://client-scripts.styla.com/scripts/clients/your-brand.js" async="" type="text/javascript" xml="space"></script>
<!-- end -->
<!-- embed multiple areas in the same page -->
<!-- this goes in <head> -->
<script src="http://client-scripts.styla.com/scripts/clients/your-brand.js" async type="text/javascript"></script>
View vpn-connect.sh
//connect to VPN
wg-quick up prod
//turn off
wg-quick down prod
@antoniocosentino
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'}
{/block}
{* Sidebar left *}
{block name='frontend_index_content_left'}
{$smarty.block.parent}
<style>
@antoniocosentino
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}
{block name="frontend_index_content_left"}
<style>
#gLeft { display:none; }
@antoniocosentino
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
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>';
print_r($string);
echo '</pre>';
}
?>
@antoniocosentino
antoniocosentino / git.md
Last active Oct 9, 2018 — forked from hofmannsven/README.md
Git Cheat Sheet
View git.md

git help

General

Initialize Git: git init

Get everything ready to commit:

You can’t perform that action at this time.