Skip to content

Instantly share code, notes, and snippets.

@mykt0ngc0
mykt0ngc0 / Gradient.js
Created May 21, 2025 05:22 — forked from jordienr/Gradient.js
Stripe Mesh Gradient WebGL
/*
* Stripe WebGl Gradient Animation
* All Credits to Stripe.com
* ScrollObserver functionality to disable animation when not scrolled into view has been disabled and
* commented out for now.
* https://kevinhufnagl.com
*/
@mykt0ngc0
mykt0ngc0 / acf_image_local_avatar.php
Created September 2, 2021 09:07 — forked from JiveDig/acf_image_local_avatar.php
Use ACF image field on user profile for WP local avatars
<?php
/**
* Use ACF image field as avatar
* @author Mike Hemberger
* @link http://thestizmedia.com/acf-pro-simple-local-avatars/
* @uses ACF Pro image field (tested return value set as Array )
*/
add_filter('get_avatar', 'tsm_acf_profile_avatar', 10, 5);
function tsm_acf_profile_avatar( $avatar, $id_or_email, $size, $default, $alt ) {
@mykt0ngc0
mykt0ngc0 / plink-plonk.js
Created August 31, 2021 09:42 — forked from tomhicks/plink-plonk.js
Listen to your web pages
@mykt0ngc0
mykt0ngc0 / animatedScrollTo.js
Created August 3, 2021 09:45 — forked from joshbeckman/animatedScrollTo.js
ScrollTo animation using pure javascript and no jquery
document.getElementsByTagName('button')[0].onclick = function () {
scrollTo(document.body, 0, 1250);
}
function scrollTo(element, to, duration) {
var start = element.scrollTop,
change = to - start,
currentTime = 0,
increment = 20;
@mykt0ngc0
mykt0ngc0 / acf_modifications.php
Created July 14, 2021 09:08 — forked from courtneymyers/acf_modifications.php
Reduces initial height of Advanced Custom Fields WYSIWYG fields to 100px, and enables autoresizing of WYSIWYG field, as text is entered. Best practice would be to include this function in a site-specific plugin.
<?php
/*
* -----------------------------------------------------------------------------
* Advanced Custom Fields Modifications
* -----------------------------------------------------------------------------
*/
function PREFIX_apply_acf_modifications() {
?>
<style>
@mykt0ngc0
mykt0ngc0 / functions.php
Created June 17, 2019 19:44 — forked from yratof/functions.php
ACF OEmbed with thumbnails
<?php
/* Pull apart OEmbed video link to get thumbnails out*/
function get_video_thumbnail_uri( $video_uri ) {
$thumbnail_uri = '';
// determine the type of video and the video id
$video = parse_video_uri( $video_uri );
// get youtube thumbnail
@mykt0ngc0
mykt0ngc0 / functions.php
Created June 17, 2019 12:17 — forked from yratof/functions.php
Getting the Video ID from ACF OEmbed, then using that ID to call in videos without bloat
<?php
/* Parse the video uri/url to determine the video type/source and the video id */
function parse_video_uri( $url ) {
// Parse the url
$parse = parse_url( $url );
// Set blank variables
$video_type = '';
$video_id = '';
@mykt0ngc0
mykt0ngc0 / remove-divi-project-post-type.php
Created May 31, 2019 06:04 — forked from renventura/remove-divi-project-post-type.php
Remove the Projects Post Type from Divi by Elegant Themes
<?php //* Mind this opening php tag
/**
* This will hide the Divi "Project" post type.
* Thanks to georgiee (https://gist.github.com/EngageWP/062edef103469b1177bc#gistcomment-1801080) for his improved solution.
*/
add_filter( 'et_project_posttype_args', 'mytheme_et_project_posttype_args', 10, 1 );
function mytheme_et_project_posttype_args( $args ) {
return array_merge( $args, array(
'public' => false,
@mykt0ngc0
mykt0ngc0 / GLSL-Noise.md
Created February 14, 2019 05:32 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
@mykt0ngc0
mykt0ngc0 / Contract Killer 3.md
Created November 19, 2018 00:50
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post