Skip to content

Instantly share code, notes, and snippets.

View aleksanderwalczuk's full-sized avatar
🎯
Focusing

Aleksander Walczuk aleksanderwalczuk

🎯
Focusing
View GitHub Profile
@aleksanderwalczuk
aleksanderwalczuk / js
Last active May 20, 2023 22:52
Scheduled touch events on ATF
(function () {
const MAX_SCHEDULE_SECONDS = 5;
function getCenterOfScreen() {
// Get the width and height of the viewport
// Calculate the center coordinates of the viewport
return {
x: window.screen.width,
y: window.screen.height,
};
}
<style>
.last-minute {
.section-content {
display: flex;
flex-direction: column;
}
.img-col {
margin-bottom: 90px;
}
.title-container {

path: docker/app/debug.ini

xdebug.mode = debug
xdebug.discover_client_host = 1
xdebug.client_host = host.docker.internal
xdebug.client_port = 9000
xdebug.log_level = 0
<div style="text-align: center;">We can't wait for you to kick back and relax in a comfy Yellow Leaf Hammock!</div>
<div style="text-align: center;">Each of our hammocks and hanging chairs is delivered with a "Hammocking 101" Guidebook to help you hang it anywhere! The guidebook includes all of the hammock hanging information pictured here, so you'll have a handy resource to keep on hand.</div>
<div style="text-align: center;"></div>
<div style="text-align: center;">Our versatile hammocks can be hung from trees, porches, balconies- even indoors! We also offer every customer "hammock concierge" service and we can help answer your questions every step of the way! </div>
<div style="text-align: center;">Let's get started!</div>
<div style="text-align: center;"></div>
<div style="text-align: center;"><!-- START ANATOMY --></div>
<h2 style="text-align: center;">Anatomy of a Hammock</h2>
<div style="text-align: center;">First, let’s make sure we have the hammock vocabulary down! There are 3 parts of a hammock you n
const showPopupButton = document.querySelector('#testuj > div.ec-section__button > a')
const showPopupButtonContainer = document.querySelector('#testuj > div.ec-section__button')
const ATFContainer = document.querySelector('#page > div.page__wrapper > div:nth-child(2) > section.ec-banner > div > div > div.col-12.col-lg-6.order-2.order-lg-1')
const newButton = showPopupButton.cloneNode(true)
const showPopupButtonSection = document.querySelector('#testuj')
ATFContainer.appendChild(newButton)
// array of section__button children
// used filter to gather only children which tag name is div
@aleksanderwalczuk
aleksanderwalczuk / picky-bundle-section.html
Last active September 24, 2021 11:39
ylh-custom-scripts
<style>
.picky-bundler-container {
padding-top: 48px;
padding-bottom: 36px;
}
.BundleSlide_picky-bundle-slide-container_3lty6 {
padding: 0 15px;
}
const pageFunctions = {
computedHeight: {
selector: '.cart-buttons',
callback: function () {
const table = document.querySelector('#shopping-cart-table')
const btns = document.querySelector('.cart-buttons')
const tableHeightStr = window.getComputedStyle(table).height
const getTableHeight = () => {
if (tableHeightStr) {
const arr = Array.from(tableHeightStr).slice(0, tableHeightStr.length - 2).join('')
@aleksanderwalczuk
aleksanderwalczuk / etl-bonobo.py
Last active September 14, 2021 15:25
etl-tutorial
import bonobo
import json
import time
def w(*arg):
yield arg
def x(*args):
time.sleep(1)
yield args[0]
@aleksanderwalczuk
aleksanderwalczuk / download-convert-base64.js
Created September 11, 2021 17:05
download-convert-base64
function getBase64ToWoff() {
function dataURLtoFile(dataurl, filename) {
var arr = dataurl.split(','),
mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]),
n = bstr.length,
u8arr = new Uint8Array(n);

Scraper container doesn't boot on MacOS

Stack trace

overlay-build_1   | /app/node_modules/.pnpm/esbuild@0.12.19/node_modules/esbuild/bin/esbuild: 1: /app/node_modules/.pnpm/esbuild@0.12.19/node_modules/esbuild/bin/esbuild: Syntax error: word unexpected (expecting ")")
overlay-build_1   | events.js:292
overlay-build_1   |       throw er; // Unhandled 'error' event
overlay-build_1   |