Skip to content

Instantly share code, notes, and snippets.

View szlegradi's full-sized avatar
🎯
Focusing

Szabolcs Légrádi szlegradi

🎯
Focusing
View GitHub Profile
@MjHead
MjHead / validate-cct-item.php
Created August 15, 2022 15:53
Insert new CCT item with JetFormBuilder only if similar item not exists
<?php
/**
* 1. Add action Hook before Insert/update CCT, set 'validate-cct' as hook name - https://i.imgur.com/48wcTA4.png
* 2. Replace 'tournaments' with your actual CCT slug
* 3. Replace 'name' with actual parameters to find similar items
*/
add_filter( 'jet-form-builder/custom-filter/validate-cct', function( $result, $request, $action ) {
$cct_slug = 'tournaments';
$cct = \Jet_Engine\Modules\Custom_Content_Types\Module::instance()->manager->get_content_types( $cct_slug );
@phanan
phanan / MyList.vue
Last active February 2, 2023 17:10
Virtual scroller with Vue Composition API
<template>
<VirtualScroller v-slot="{ item }" :item-height="35" :items="myMassiveArray">
<div :item="item" :key="item.id">{{ item.details.i.guess? }}</div>
</VirtualScroller>
</template>
@zavan
zavan / yt.js
Last active July 8, 2024 08:20
Listening to the YouTube Embed Iframe time change events without polling player.getCurrentTime()
// Load the IFrame Player API code asynchronously.
var tag = document.createElement("script");
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName("script")[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
// Instantiate the Player.
function onYouTubeIframeAPIReady() {
var player = new YT.Player("player", {
@medyo
medyo / upload_dysms.md
Last active July 24, 2023 12:03
Upload dSYMs file to Crashlytics for react Native projects

1 - Download the dSYMs File from Appstore

  • go to https://appstoreconnect.apple.com/
  • Click on My Apps
  • From the left sidebar choose the app version you would like to get its dSYM
  • Scroll down to the Build section then click on the build version
  • then Build Metadata
  • On the new page, look for "Includes Symbols"
  • Click on Download dSYM
  • If not found please use the below method
@nzakas
nzakas / techleadbook.md
Created March 20, 2018 20:44
Tech Lead Book

Tech Lead Book

  1. Introduction
  2. What is a Tech Lead?
  3. The Tech Lead Mindset
  4. Becoming a Tech Lead
  5. Working Cross-Functionally
  6. The Art of Delegation
  7. Technical Best Practices
  8. Effective Decision Making
@apisandipas
apisandipas / share-urls.md
Last active July 5, 2024 05:25 — forked from chrisjlee/drupal-views-share-global-text-field
Share url's for Facebook, Twitter, Pinterest and Linkedin with just get variables

Creating share buttons with just URL's

Twitter

http://twitter.com/share?text=<TITLE>&url=<URL>

E.g. http://twitter.com/share?text=This+is+google+a+search+engine&url=https%3A%2F%2Fwww.google.com

Facebook

http://www.facebook.com/sharer.php?u=&amp;p[title]=

@bevacqua
bevacqua / books.md
Last active October 13, 2018 16:52
Books I plan on buying this week

Web Performance

  • High Performance Web Sites: Essential Knowledge for Front-End Engineers
  • High Performance JavaScript (Build Faster Web Application Interfaces)
  • Even Faster Web Sites: Performance Best Practices for Web Developers
  • Designing for Performance: Weighing Aesthetics and Speed

Web Design

  • Adaptive Web Design: Crafting Rich Experiences with Progressive Enhancement (2nd Edition) (Voices That Matter)
@bishboria
bishboria / springer-free-maths-books.md
Last active June 8, 2024 06:39
Springer made a bunch of books available for free, these were the direct links
@joepie91
joepie91 / vpn.md
Last active July 17, 2024 14:15
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.