If you get an "Invalid name" error when you run npm init -y
, rename the project folder to only contain lowercase ASCII letters or hyphens (e.g. my-project
), and try again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// extensions/users-permissions/controllers/Auth.js | |
"use strict"; | |
/** | |
* Auth.js controller | |
* | |
* @description: A set of functions called "actions" for managing `Auth`. | |
*/ | |
/* eslint-disable no-useless-escape */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Overridden strapi article controller file | |
'use strict'; | |
//Controllers | |
const { parseMultipartData, sanitizeEntity } = require('strapi-utils'); | |
/** | |
* Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#core-controllers) | |
* to customize this controller | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const puppeteer = require('puppeteer'); | |
(async function main() { | |
try { | |
const browser = await puppeteer.launch(); | |
const [page] = await browser.pages(); | |
await page.goto('https://example.org/'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Add React in One Minute</title> | |
</head> | |
<body> | |
<h2>Add React in One Minute</h2> | |
<p>This page demonstrates using React with no build tooling.</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
AWS.config.logger = console; | |
const dynamodb = new AWS.DynamoDB({ apiVersion: '2012-08-10' }); | |
let val = 'some value'; | |
let params = { | |
TableName: "MyTable", | |
ExpressionAttributeValues: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from "react"; | |
import "./App.css"; | |
import { Route, Switch, Router } from "react-router-dom"; | |
import Header from "../src/components/header/header"; | |
import SideBar from "../src/components/sidebar/sidebar"; | |
import Login from "./components/login/login.js"; | |
import Dashboard from "./components/dashboard/dashboard"; | |
import RequireAuth from "./components/utility/require-auth"; | |
import history from "./components/utility/history"; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create a test index with shingle mapping | |
curl -XPUT localhost:9200/test -d '{ | |
"settings":{ | |
"index":{ | |
"analysis":{ | |
"analyzer":{ | |
"analyzer_shingle":{ | |
"tokenizer":"standard", | |
"filter":["standard", "lowercase", "filter_stop", "filter_shingle"] | |
} |
NewerOlder