Skip to content

Instantly share code, notes, and snippets.

Sébastien Castiel scastiel

View GitHub Profile
@scastiel
scastiel / queries.graphql
Last active Apr 21, 2019
Graphcool types and queries
View queries.graphql
mutation {
createUser(name: "Sébastien") {
id
name
}
}
mutation {
createUser(name: "Mary") {
id
@scastiel
scastiel / wakeMeUp.sol
Created May 31, 2018
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=
View wakeMeUp.sol
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;
View Quiz JavaScript.md

Quiz


Question 1

Qu'affiche le programme suivant ?

function f() {
View tp-02-start.js
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] }
]
View serveur.js
// Installer fs-promise avec : npm install fs-promise
const http = require('http')
const fs = require('fs-promise')
function factorial (n) {
return n === 0 ? 1 : n * factorial(n - 1)
}
const server = http.createServer((req, res) => {
View gist:45a88141079092a134a2b0ff1449e06e
Verifying that "scastiel.id" is my Blockstack ID. https://onename.com/scastiel
@scastiel
scastiel / pm-inbox-theme.css
Last active Nov 3, 2019
Inbox theme for ProtonMail
View pm-inbox-theme.css
/**
* Hey :)
* The theme has moved to a dedicated repository: https://github.com/scastiel/pm-inbox-theme
*/
View keybase.md

Keybase proof

I hereby claim:

  • I am scastiel on github.
  • I am scastiel (https://keybase.io/scastiel) on keybase.
  • I have a public key whose fingerprint is 9CEA AA61 AD13 575B 1D5D F9D0 AE15 CE93 4EC9 436C

To claim this, I am signing this object:

View es6-object-assign.js
const objA = {
a: 1,
b: 2
}
const objB = {
... objA
b: 3,
c: 4
}
View paperFormats.js
function A(n) {
if (n === 0) {
return [ 841, 1189 ];
} else {
var dimAn1 = A(n - 1);
return [Math.floor(dimAn1[1] / 2), Math.floor(dimAn1[0])];
}
}
window.A = A;
You can’t perform that action at this time.