Skip to content

Instantly share code, notes, and snippets.

View scastiel's full-sized avatar

Sebastien Castiel scastiel

View GitHub Profile
@scastiel
scastiel / README.md
Last active February 21, 2024 15:40
Confoo 2024 – Server Components: Don’t Miss the Next Revolution in React
@scastiel
scastiel / plausible-boost.js
Created October 25, 2023 22:32
Arc Browser Boost to display Plausible real-time visitors in favicon
const logo = `
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1000px" height="1000px" viewBox="0 0 1000 1000" version="1.1">
<!-- Generator: Sketch 64 (93537) - https://sketch.com -->
<title>Artboard</title>
<desc>Created with Sketch.</desc>
<defs>
<radialGradient cx="79.1305263%" cy="87.6448158%" fx="79.1305263%" fy="87.6448158%" r="96.9897763%" id="radialGradient-1">
<stop stop-color="#2440E6" offset="0%"/>
<stop stop-color="#5661B3" offset="100%"/>
</radialGradient>
@scastiel
scastiel / hello.js
Created May 15, 2023 14:56
JavaScript basics
console.log("Hello World!");
// --------------- Variables ---------------
let count = 12;
console.log(count);
count = count + 1;
console.log(count);
const firstName = 'John';
@scastiel
scastiel / SeoHeaders.ts
Last active September 28, 2022 19:55
SeoHeaders.ts
import Head from 'next/head'
export const SeoHeaders = ({
title,
description,
author,
twitterAuthor,
twitterSite,
url,
imageUrl,
<?php
echo "Hello!";
?>
@scastiel
scastiel / Makefile
Last active July 4, 2023 12:00
Resources for eBook creating using Pandoc
all: pdf epub kindle html examples
BOOK_TITLE = A\ React\ Developer’s\ Guide\ to\ Hooks\ -\ Sebastien\ Castiel
dist:
@mkdir -p dist
pdf: dist/${BOOK_TITLE}.pdf
@echo '✅ PDF'
@scastiel
scastiel / queries.graphql
Last active April 21, 2019 16:50
Graphcool types and queries
mutation {
createUser(name: "Sébastien") {
id
name
}
}
mutation {
createUser(name: "Mary") {
id
@scastiel
scastiel / wakeMeUp.sol
Created May 31, 2018 00:23
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract WakeMeUp {
event Print(string _name, uint _value);
event PrintString(string _name, bytes32 _value);
struct Alarm {
uint id;
address owner;

Quiz


Question 1

Qu'affiche le programme suivant ?

function f() {
const data = {
persons: [
{ id: 0, name: "Sherlock Holmes", numbers: ["555-0101", "555-0199"] },
{ id: 1, name: "John Watson", numbers: ["555-0102", "555-0198"] }
],
groups: [
{ id: 0, name: "Londonians", personsIds: [0, 1] },
{ id: 1, name: "Doctors", personsIds: [1] }
]