Skip to content

Instantly share code, notes, and snippets.

<script>
console.log('<= cross-domain =>')
const VALUE_KEY = 'myValue'
window.onload = () => {
console.log('cross-domain load =>')
try {
if (typeof window !== 'undefined' && typeof localStorage !== 'undefined') {
@KarllosSouza
KarllosSouza / nomadgoods_snippets.js
Last active August 17, 2020 13:30
Useful snippets to test the NomadGoods pages.
// GoTo ProductPage
javascript:window.open(`https://nomad.frontend.getshogun.com/products/${document.querySelector('p[class*=Text__Heading').innerText}`,'_blank');
// Switch between 'nomadgoods.com' and 'nomad.frontend.getshogun.com'
javascript:(function(){if(window.location.href.includes('nomadgoods.com')){const url=window.location.href.replace('nomadgoods','nomad.frontend.getshogun');window.location.replace(url);}if(window.location.href.includes('nomad.frontend.getshogun.com')){const url=window.location.href.replace('nomad.frontend.getshogun','nomadgoods');window.location.replace(url);}})();
// HubApp FullScreen
javascript:(function(){if(!document.querySelector('#__next > div > main > div:last-child > div').style.position){document.querySelector('#__next > div > main > div:last-child > div').style.position='absolute';document.querySelector('div[class*="LivePreview__IframeContainer"]').style.borderWidth=0;}else{ document.querySelector('#__next > div > main > div:last-child > div').style.position='';documen
@KarllosSouza
KarllosSouza / SampleComponent.vue
Created July 26, 2018 01:20
Vue Component Structure
<template lang="html">
<div class="sample-class">
<!-- ... -->
</div>
</template>
<script type="text/javascript">
export default {
// Don't forget
name: 'SampleComponent',

Git Commands

Rename a local branch: git branch -m branch-name

Delete a local branch: git branch -d branch-name

Delete a remote branch: git branch -dr origin/branch-name

Remove local branches which are no longer available on the remote: git fetch -p

@KarllosSouza
KarllosSouza / dev_guides.md
Last active June 3, 2019 16:56
Dev Guides