Skip to content

Instantly share code, notes, and snippets.

View RemiBonnet's full-sized avatar
🚀
Busy creating cutting edge experiences

Rémi Bonnet RemiBonnet

🚀
Busy creating cutting edge experiences
View GitHub Profile
import React from 'react'
import { graphql } from 'gatsby'
import Layout from '../component/layout/'
import SEO from '../component/seo/'
import Article from '../component/article'
const IndexPage = props => (
<Layout>
<div className="page">
<SEO title="My blog" keywords={[`blog`, `gatsby`, `prismic`]} />
query Articles {
articles: allPrismicArticle {
edges {
node {
data {
title {
text
}
image {
url
// Get variable from environment file
require('dotenv').config({
path: `.env`,
})
module.exports = {
// […]
plugins: [
{
resolve: `gatsby-source-prismic`,
@RemiBonnet
RemiBonnet / index.js
Created May 29, 2019 05:52
src/pages/index.js
import React from 'react'
import Layout from '../component/layout/'
import SEO from '../component/seo/'
import Article from '../component/article'
const IndexPage = () => (
<Layout>
<div className="page">
<SEO title="Home - blog" keywords={[`blog`, `gatsby`]} />
<Article />
@RemiBonnet
RemiBonnet / index.js
Last active June 27, 2019 02:47
/components/article/index.js
import React from 'react'
import { Link } from 'gatsby'
// Import custom style for this component
import '../article/style.scss'
const Article = () => (
<Link to="/" className="c-article">
<img alt="" src="https://source.unsplash.com/random/800x600" />
<h2>Name</h2>
</Link>
const https = require('https');
exports.handler = async (event, context) => {
return new Promise((resolve, reject) => {
const options = {
hostname: 'api.travis-ci.org',
path: `/repo/${process.env.TRAVIS_CLIENT_NAME}%2F${process.env.TRAVIS_REPO_NAME}/requests`,
method: 'POST',
headers: {
'Content-Type': 'application/json',
Osny
honey
Oni
Ony
oni
omy
homi
homy
omy omy
omi omi
Osny
honey
Oni
Ony
oni
omy
homi
homy
omy omy
////////////////////////////////////
//// Ball ////
////////////////////////////////////
function Ball(r, p, v) {
this.radius = r;
this.position = p;
this.velocity = v;
this.maxVel = 0.2;
import React, { Component } from 'react';
import Title from '../todo/Title';
import TodoForm from '../todo/TodoForm';
import TodoList from '../todo/Todo';
class TodoApp extends Component {
constructor(props){
// Pass props to parent class
super(props);
// Set initial state