Skip to content

Instantly share code, notes, and snippets.

@valenjeb
valenjeb / gsap-eases.css
Created January 13, 2025 18:15 — forked from jh3y/gsap-eases.css
GreenSock eases with CSS linear()
:root {
--none: linear(0, 1);
--power1-in: linear( 0, 0.0039, 0.0156, 0.0352, 0.0625, 0.0977, 0.1407, 0.1914, 0.2499, 0.3164, 0.3906 62.5%, 0.5625, 0.7656, 1 );
--power1-out: linear( 0, 0.2342, 0.4374, 0.6093 37.49%, 0.6835, 0.7499, 0.8086, 0.8593, 0.9023, 0.9375, 0.9648, 0.9844, 0.9961, 1 );
--power1-in-out: linear( 0, 0.0027, 0.0106 7.29%, 0.0425, 0.0957, 0.1701 29.16%, 0.2477, 0.3401 41.23%, 0.5982 55.18%, 0.7044 61.56%, 0.7987, 0.875 75%, 0.9297, 0.9687, 0.9922, 1 );
--power2-in: linear( 0, 0.0014 11.11%, 0.0071 19.24%, 0.0188 26.6%, 0.037 33.33%, 0.0634 39.87%, 0.0978 46.07%, 0.1407 52.02%, 0.1925 57.74%, 0.2559 63.49%, 0.3295 69.07%, 0.4135 74.5%, 0.5083 79.81%, 0.6141 85%, 0.7312 90.09%, 1 );
--power2-out: linear( 0, 0.2688 9.91%, 0.3859 15%, 0.4917 20.19%, 0.5865 25.5%, 0.6705 30.93%, 0.7441 36.51%, 0.8075 42.26%, 0.8593 47.98%, 0.9022 53.93%, 0.9366 60.13%, 0.963 66.67%, 0.9812 73.4%, 0.9929 80.76%, 0.9986 88.89%, 1 );
--power2-in-out: linear( 0, 0.0036 9.62%, 0.0185 16.66
@valenjeb
valenjeb / TelegramLogger.php
Last active December 23, 2024 08:26
Custom Telegram logger for the Tracy Debugger (https://github.com/nette/tracy)
<?php
use Tracy\Debugger;
use Tracy\Helpers;
use Tracy\ILogger;
use Tracy\Logger;
class TelegramLogger implements ILogger
{
private static string $apiUrl = 'https://api.telegram.org/bot';
@valenjeb
valenjeb / code-editor-rules.md
Created December 17, 2024 20:31 — forked from yifanzz/code-editor-rules.md
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@valenjeb
valenjeb / .htaccess
Created November 7, 2024 19:45
.htaccess primary domain to web redirect for shared hosting
Options -Indexes
# .htaccess primary domain to web redirect
# this file must be in the /public_html folder of your hosting account
# make the changes to the file according to the instructions.
<IfModule mod_rewrite.c>
# Do not change this line.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com$
@valenjeb
valenjeb / CustomProduct.php
Created October 17, 2024 20:14
Make WordPress custom post type work as a WooCommerce product
<?php
declare(strict_types=1);
namespace Company\Project;
use WC_Product;
class CustomProduct extends WC_Product
{
@valenjeb
valenjeb / ExampleTest.php
Created October 17, 2024 10:07
Set up PHP Unit test for a WordPress themes
<?php
declare(strict_types=1);
/**
* PUT THIS FILE IN THE TESTS DIRECTORY
*/
namespace Company\Project\Tests;
@valenjeb
valenjeb / customroutes.php
Created August 20, 2024 20:30 — forked from samhernandez/customroutes.php
A simple class to add custom routes to Wordpress.
<?php
/**
* NOTE: This gist is very old. You might want to check out recent forks
* like this one: https://github.com/Alexlytle/Wordpress_custom_route/blob/main/Wordpress_Custom_route.php
* (thanks @Alexlytle) If you have an improvement to this gist, please
* post a link in a comment for others who might benefit. Thanks!
*
* A class to create simple custom routes.
*
@valenjeb
valenjeb / inject-gtm-code-snippet.php
Last active November 7, 2024 19:56
A simple WP plugin that I use to inject Google Tag Manager code on clients website. Put this file into the `mu-plugins` directory
<?php
/**
* Plugin Name: Inject GTM Code Snippet
* Description: Inject GTM code snippets into the site <head> and after the opening <body>.
* Version: 1.0.0
* Author: Valentin Jebelev
* Author URI: https://github.com/valenjeb
*/