Skip to content

Instantly share code, notes, and snippets.

View tclain's full-sized avatar

Timothée Clain tclain

View GitHub Profile
const externValue = "Timothee"
myTemplate`Hello ! ${externValue}`
myTemplate`Hello !`
const garageName = 'montreal247'
const displayCar = (car) => {
const carList = document.querySelector('.cars-list')
carList.insertAdjacentHTML('beforeend', `
<div class="car">
<div class="car-image">
<img src="http://loremflickr.com/280/280/Ferrari 308 GTS" />
</div>
const authorization = "Bearer sk_c25cc80d2eb82759b32f9bd53204af89";
// TODO
const fetchData = (email) => {
fetch(`https://person.clearbit.com/v2/combined/find?email=${email}`, {
headers: new Headers({
Authorization: authorization
})
})
/*
<li>
The name of my movie
<img href="" />
</li>*/
const omdbUrl = (query) => `http://www.omdbapi.com/?s=${query}&apikey=adf1f2d7`
/*
<li>
The name of my movie
<img href="" />
</li>*/
const omdbUrl = (query) => `http://www.omdbapi.com/?s=${query}&apikey=adf1f2d7`
@tclain
tclain / algolia fetch.js
Last active May 8, 2019 14:12
algolia fetch
const ALGOLIA_PLACES = "https://places-dsn.algolia.net/1/places/query"
//const searchBody = (query) => `{"params":"hitsPerPage=5&language=en&query=${query}"}`
const searchBody = (query) => {
return JSON.stringify({
"params":`hitsPerPage=5&language=en&query=${query}`
})
}
function myTemplate() {}
@tclain
tclain / sample.tagged-templates.1.js
Last active May 7, 2019 17:16
samples-tagged-templates
const greet = (name) => `hello ${name}`
greet('timothee') // hello timothee

You can quickly get started with Bootstrap with nothing do download using the following template:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">