Skip to content

Instantly share code, notes, and snippets.

View eimkasp's full-sized avatar
🍀
Building...

Eimantas eimkasp

🍀
Building...
View GitHub Profile
@eimkasp
eimkasp / setinterval.js
Created November 26, 2021 16:49
setInterval Example
/* Funkcija kuri kartojasi kas sekunde */
let seconds = 0;
setInterval(function() {
console.log("As esu setIntervalFunkcija, sekunde: " + seconds);
seconds++;
}, 1000);
@eimkasp
eimkasp / Section.json
Created March 1, 2022 21:09
Example JSON Component Structure
Sections Array[]
0 [{ // What are our section keys
'component': 'HeroSection', // Define the component that is used for this section
'order' : 1,
'background' : {
'type' : 'image', // video / color
'color' : '#ffffff',
'url' : '#'
},
@eimkasp
eimkasp / gist:177bb68258b06c76ec48742cdad30527
Created August 8, 2022 13:43
Javascript Test Užduoties
// 1. Suraskite didžiausią skaičių masyve
// 2. Suskaičiuokite skaičių vidurkį.
var array = [3 , 6, 2, 56, 32, 5, 89, 32];
var largest= 0;
@eimkasp
eimkasp / index.pug
Created August 11, 2022 15:26
Simple Weather App Design
.container
.weather-side
.weather-gradient
.date-container
h2(class="date-dayname") Tuesday
span(class="date-day") 15 Jan 2019
i(class="location-icon" data-feather="map-pin")
span(class="location") Paris, FR
.weather-container
i(class="weather-icon" data-feather="sun")
@eimkasp
eimkasp / functions.php
Created February 8, 2024 11:22
WooCommerce Phone Number Validation (+370/+371/+372) for LT/LV/EE
// Add following code to functions php of your theme
add_action( 'woocommerce_checkout_process', 'validate_phone_number_for_specific_countries' );
function validate_phone_number_for_specific_countries() {
$phone = isset( $_POST['billing_phone'] ) ? wc_clean( $_POST['billing_phone'] ) : '';
$billing_country = isset( $_POST['billing_country'] ) ? wc_clean( $_POST['billing_country'] ) : '';
// Specify the countries requiring phone number validation
$countries_requiring_validation = array( 'LT', 'LV', 'EE' );