Skip to content

Instantly share code, notes, and snippets.

View dmassiani's full-sized avatar
👾
Resport

Massiani David dmassiani

👾
Resport
View GitHub Profile
import { Configuration, OpenAIApi } from "openai";
import _ from 'lodash'
import { serverSupabaseClient } from '#supabase/server'
let client
const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAIApi(configuration);
const start = async () => {
await asyncForEach([1, 2, 3], async (num) => {
await waitFor(50);
console.log(num);
});
console.log('Done');
}
start();
test <- function(JURID) {
resultat <- compar_ielst_411 %>% filter(I_ELSE==JURID)
return(resultat)
}
kable("html", format.args = list(etc))
slider({
[...](tes options)
}).on('slideStart', function(e){
console.log(e);
});
Aaron
Abdon
Abel
Abélard
Abelin
Abondance
Abraham
Absalon
Acace
Achaire
Abdon
Abel
Abigaëlle
Abigaïl
Acacius
Acanthe
Adalbert
Adalsinde
Adegrine
Adélaïde
$(document.body).delegate( '#overlay' , 'click', function(e){
e.preventDefault();
$(document).trigger('overlayFocus', [this]);
});
$(document).on('overlayFocus', function ( event, button ) {
// remove overlay
// blur search
});
@dmassiani
dmassiani / simple-component-extract
Created October 26, 2016 11:54
Simple Component Extract
<?php the_component('slug'); ?>
@dmassiani
dmassiani / component-full-example.php
Last active September 26, 2016 18:50
WordPress Component - Full Example
<?php
/*
Template Name: Full Example
Description: Full example component
---------------------------------------------------------------------
{"type": "title", "name": "Title", "slug": "title"}
{"type": "editor", "name": "Content", "slug": "content"}
{"type": "image", "name": "Illustration", "slug": "illustration"}
{"type": "link", "name": "Link", "slug": "link"}
{"type": "id", "name": "Id", "slug": "id"}
https://fr.wordpress.org/plugins/safe-attachment-names/
https://fr.wordpress.org/plugins/advanced-custom-fields/
https://fr.wordpress.org/plugins/regenerate-thumbnails/
https://fr.wordpress.org/plugins/wp-pagenavi/
https://fr.wordpress.org/plugins/redirection/
https://fr.wordpress.org/plugins/post-types-order/
https://fr.wordpress.org/plugins/user-role-editor/
https://fr.wordpress.org/plugins/wpcomponent/
https://wordpress.org/plugins/slate-admin-theme/