Skip to content

Instantly share code, notes, and snippets.

View iampoul's full-sized avatar
:octocat:

Poul Poulsen iampoul

:octocat:
View GitHub Profile
@iampoul
iampoul / Gradient.js
Created September 4, 2022 07:37 — 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
*/
@iampoul
iampoul / sortandcreate.js
Created June 7, 2022 07:42
Sort JSON and Create UL LI
const menuItems = [
{},
{}
]
const objects = ["fields", "icon"]
const fields = [...objects, "title", "slug"]
const cleanupJSON = (list: any) => {
const json: any = {}
@iampoul
iampoul / gist:605fb81edc70ee005e61bb35df11fc5f
Created April 19, 2022 08:30
wrap react app in multiple providers
import React from "react"
// import 'as' alias to prevent naming conflicts
import { Provider as NextAuthProvider } from 'next-auth/client'
import { Provider as ReduxProvider } from 'react-redux'
export default function App ({ Component, pageProps }) {
return (
<ReduxProvider>
<NextAuthProvider options={{ ... }}>
<Component {...pageProps} />
version: "3"
services:
strapi:
container_name: strapi
image: strapi/strapi
environment:
- DATABASE_CLIENT=postgres
- DATABASE_HOST=db
- DATABASE_PORT=5432
- DATABASE_NAME=strapi
@iampoul
iampoul / scrollwaypoints.html
Created May 28, 2021 06:51 — forked from chrisle/scrollwaypoints.html
Scrolling + jQuery Waypoints
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<!-- Download from here: http://imakewebthings.com/jquery-waypoints/ -->
<script src="https://raw.githubusercontent.com/imakewebthings/jquery-waypoints/master/waypoints.js"></script>
<style type="text/css">
/* A box that is 500px tall */
.content {
height: 500px;
var list = document.querySelectorAll('[data-tooltip-content="Fjern"]');
for (var i = 0; i < list.length; i++) {
list[i].click();
}
/**
* @param array $array
* @param string $child
* @return array
*/
public function find_child_array_values_by_key(array $array, string $child): array
{
foreach (
new RecursiveIteratorIterator(
new RecursiveArrayIterator($array),
@iampoul
iampoul / XGH - PT-BR.txt
Created November 4, 2016 11:21 — forked from banaslee/XGH - en.txt
eXtreme Go-Horse Process
Fonte: http://gohorseprocess.wordpress.com
1- Pensou, não é XGH.
XGH não pensa, faz a primeira coisa que vem à mente. Não existe
segunda opção, a única opção é a mais rápida.
2- Existem 3 formas de se resolver um problema, a correta, a errada e
a XGH, que é igual à errada, só que mais rápida.