Skip to content

Instantly share code, notes, and snippets.

View Kadreev's full-sized avatar
🚀
Reaching goals

Kadreev

🚀
Reaching goals
View GitHub Profile
@Kadreev
Kadreev / AlpineJS Select Tag
Created June 20, 2022 21:00
AlpineJS Select Tag
// vim: syntax=javascript
<div x-data="{foo :'not selected'}">
<select @change="foo = $event.target.value">
<option x-bind:value="1">option 1</option>
<option x-bind:value="2">option 2</option>
<option x-bind:value="3">option 3</option>
</select>
<span x-text="'option '+ foo"></span>
</div>
@Kadreev
Kadreev / functions in object
Created July 1, 2022 02:40
functions in object
let voleur = {
action : () =>console.log ('Coup de dague fatal') ,
crie : ('pour la horde!!!!') ,
coupfatal :()=> console.log ('coup dans le dos')
}
voleur.action() ;
voleur.coupfatal() ;
console.log(voleur.crie) ;
@Kadreev
Kadreev / shadows.txt
Created November 5, 2023 03:21
Nice Shadows
{% comment %} <div class="w-11/12 h-2 mx-auto bg-gray-300 rounded-b opacity-75 rounded-xs"></div>
<div class="w-10/12 h-2 mx-auto bg-gray-300 rounded-b opacity-50 rounded-xs"></div>
<div class="w-9/12 h-2 mx-auto bg-gray-300 rounded-b opacity-25 rounded-xs"></div> {% endcomment %}
@Kadreev
Kadreev / store theme conn
Created November 16, 2023 23:34
shopify theme pull --store {store-name}
‎‎​
@Kadreev
Kadreev / atc.md
Created October 16, 2025 23:03
DebounceATC

handleQuantityButton(button) { const container = button.parentElement; const input = container?.querySelector('input[data-qty-input]'); const display = container?.querySelector('[data-qty-render]');

if (!input) return;

const currentQty = parseInt(input.value) || 0; const isPlus = button.dataset.qty === 'plus'; const newQty = isPlus ? currentQty + 1 : Math.max(0, currentQty - 1);