Skip to content

Instantly share code, notes, and snippets.

View DiegoGonzalezCruz's full-sized avatar
🎯
Focusing

Diego González Cruz DiegoGonzalezCruz

🎯
Focusing
View GitHub Profile
@DiegoGonzalezCruz
DiegoGonzalezCruz / comunas-regiones.json
Created June 23, 2022 22:06 — forked from juanbrujo/comunas-regiones.json
Comunas y regiones de chile JSON
{
"regiones": [{
"region": "Arica y Parinacota",
"comunas": ["Arica", "Camarones", "Putre", "General Lagos"]
},
{
"region": "Tarapacá",
"comunas": ["Iquique", "Alto Hospicio", "Pozo Almonte", "Camiña", "Colchane", "Huara", "Pica"]
},
{
@izzygld
izzygld / learndash-graphql.php
Created August 17, 2020 14:34
Replace REST API with @wpgraphql with @apollographql client.
<?php
add_filter( 'register_post_type_args', function( $args, $post_type ) {
if ( 'sfwd-courses' === $post_type ) {
$args['show_in_graphql'] = true;
$args['graphql_single_name'] = 'course';
$args['graphql_plural_name'] = 'courses';
}
@coleturner
coleturner / framer-motion-use-viewport-scroll-with-element-container.md
Last active February 5, 2024 09:46
(Framer Motion): useViewportScroll with element container

Demo

Context

useViewportScroll is a great way to create a parallax effect as the page scrolls. In some cases however, we only want to scroll when an element is in the viewport area.

So for example, if we have a "landscape" scene, and want to animate the Sun object only when it's in view, we start with our useViewportScroll implementation:

function Sun(props) {
 const { scrollY, scrollYProgress } = useViewportScroll();
@bradtraversy
bradtraversy / docker-help.md
Last active June 16, 2024 19:34
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info