On mac:
- Download the latest release.
- Extract the binary and place it in
/usr/local/bin.
On mac:
/usr/local/bin.| // Required Plugin: https://marketplace.visualstudio.com/items?itemName=drcika.apc-extension | |
| // settings.json | |
| { | |
| // Remove left-side icons | |
| "workbench.activityBar.location": "hidden", | |
| // Remove bottom status bar | |
| "workbench.statusBar.visible": false, | |
| // Remove position indicator in the editor's scrollbar | |
| "editor.hideCursorInOverviewRuler": true, |
| // using reduce | |
| var team = posts.team.reduce(function(prev, post, index, list) { | |
| prev.push(post.metadata.title); | |
| return prev; | |
| }, []); | |
| // using map | |
| var team = posts.team.map(function(post) { | |
| return post.metadata.title); | |
| }); |
| /* Using a JavaScript proxy for a super low code REST client */ | |
| // via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg | |
| // also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3 | |
| // also see https://github.com/fastify/manifetch | |
| // also see https://github.com/flash-oss/allserver | |
| // and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
| const createApi = (url) => { | |
| return new Proxy({}, { | |
| get(target, key) { |
| import { createHash } from "crypto"; | |
| import fs from "fs"; | |
| import fsp from "fs/promises"; | |
| import path from "path"; | |
| import https from "https"; | |
| import { PassThrough } from "stream"; | |
| import type { Readable } from "stream"; | |
| import type { LoaderFunction } from "remix"; | |
| import sharp from "sharp"; | |
| import type { Request as NodeRequest } from "@remix-run/node"; |
| <!DOCTYPE html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| </head> | |
| <body> | |
| <div id="canvas"></div> | |
| <button id="restart">Restart</button> | |
| <script src="minesweeper.js"></script> | |
| <style> | |
| * { |
| /* | |
| It's now a package. You can find it here: | |
| https://github.com/joshnuss/svelte-local-storage-store | |
| */ | |
| // Svelte store backed by window.localStorage | |
| // Persists store's data locally |
| import { writable } from 'svelte/store' | |
| // returns a store with HTTP access functions for get, post, patch, delete | |
| // anytime an HTTP request is made, the store is updated and all subscribers are notified. | |
| export default function(initial) { | |
| // create the underlying store | |
| const store = writable(initial) | |
| // define a request function that will do `fetch` and update store when request finishes | |
| store.request = async (method, url, params=null) => { |
| /** | |
| * Sets up a DOM MutationObserver that watches for elements using undefined CSS | |
| * class names. Performance should be pretty good, but it's probably best to | |
| * avoid using this in production. | |
| * | |
| * Usage: | |
| * | |
| * import cssCheck from './checkForUndefinedCSSClasses.js' | |
| * | |
| * // Call before DOM renders (e.g. in <HEAD> or prior to React.render()) |
Exercice Quelle est la différence entre wordpress.com et wordpress.org ?
Exercice Téléchargez et installez Wordpress depuis https://wordpress.org/download/. Décompressez le fichier dans votre dossier de serveur (htdocs ou www) et suivez les instructions.
Attention à bien préciser le port de la base de données dans l'URL si celui-ci n'est pas
3306:localhost:8889par exemple.