Skip to content

Instantly share code, notes, and snippets.

View gsmartagence's full-sized avatar

gsmartagence

  • Smart Agence
  • Paris
  • 16:43 (UTC +01:00)
View GitHub Profile
@gsmartagence
gsmartagence / Video.js
Created May 22, 2024 08:24 — forked from jaredpalmer/Video.js
Better <video> with intersection observer.
import { useRef, useCallback, useEffect } from 'react'
import { useInView } from 'react-intersection-observer'
import 'intersection-observer'
export default ({ src, caption, ratio }) => {
const [inViewRef, inView] = useInView({
threshold: 1,
})
const videoRef = useRef()
@gsmartagence
gsmartagence / install_nodejs_and_yarn_homebrew.md
Created January 22, 2020 07:26 — forked from nijicha/install_nodejs_and_yarn_homebrew.md
Install NVM, Node.js, Yarn via Homebrew
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@gsmartagence
gsmartagence / package.json
Last active May 24, 2018 07:18 — forked from joshcanhelp/scrollTo.js
Animated scrollTo for specific element or top of page
{
"name": "scrollTo.js",
"version": "0.1.0"
}
@gsmartagence
gsmartagence / jquery.alterclass.js
Created July 21, 2017 10:34 — forked from peteboere/jquery.alterclass.js
jQuery alterClass plugin: Remove element classes with wildcard matching. Optionally add classes.
/**
* jQuery alterClass plugin
*
* Remove element classes with wildcard matching. Optionally add classes:
* $( '#foo' ).alterClass( 'foo-* bar-*', 'foobar' )
*
* Copyright (c) 2011 Pete Boere (the-echoplex.net)
* Free under terms of the MIT license: http://www.opensource.org/licenses/mit-license.php
*
*/