$ npm install -g create-react-app
$ create-react-app my-app
This file contains 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
# Ubuntu PHP mail | |
# Ubuntu 12.04 LTS | |
# IMPORTANT : add your own data or parameters, I make use of double segments [[ your variable ]]. eg. ssh root@[[ 96.172.44.11 ]] should be replaced with ssh root@888.88.88.88 where "888.88.88.88" is your value, variable etc. I have a habit of using ":::" to indicate line ending and end of paragraph, crazy I know but be warned its just how I write ::: All notes are for my own use & should you use any it's at your own risk, it's NOT a Tutorial ::: | |
# Resources | |
# https://help.ubuntu.com/12.04/serverguide/postfix.html | |
# http://sourcelibrary.org/2011/08/29/how-to-set-up-the-php-mail-function-on-a-ubuntu-linux-lamp-server/ | |
# http://stackoverflow.com/questions/12083025/xampp-on-ubuntu-server-12-04-with-pear-installed-returns-errors-when-trying-to-u | |
# http://askubuntu.com/questions/47609/how-to-have-my-php-send-mail |
This file contains 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
----- mongo to js ------ | |
timeStamp = parseInt(Mongo.ObjectId().toString().substr(0,8), 16)*1000 | |
date = new Date(timestamp) | |
----------------------------- | |
----- js to mongo ----- | |
timestamp = new Date().getTime()/1000 | |
mongoId = new ObjectID(timestamp.toString(16)+1e16) |
This file contains 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 mapItemSchema = new mongoose.Schema({ | |
name: String, | |
location: { | |
// It's important to define type within type field, because | |
// mongoose use "type" to identify field's object type. | |
type: {type: String, default: 'Point'}, | |
// Default value is needed. Mongoose pass an empty array to | |
// array type by default, but it will fail MongoDB's pre-save | |
// validation. | |
coordinates: {type: [Number], default: [0, 0]} |
Мета-теги - это служебные слова, которые содержат важную информацию о веб-документе для поисковых систем. В большинстве случаев размещаются внутри тега head
.
Список мета-тегов для атрибута name
:
description
— описание веб-страницы, должно быть достаточно длинным и полнымkeywords
— ключевые слова,generator
— CMS сайта,author
— автор,copyright
— авторские права,robots
— правила индексирования страницы для роботов,viewport
— данные о настройке области просмотра
If we have the following structure in our application:
- 📁 application_folder_name
- 📄 index.php
- 📄 handle_form.php
- 📄 main.js
And we fill our index.php
with the following content just to get a basic website with a form working. You should be able to run this through a php-server of your choice.
This is tutorial of onfiguring eslint, prettier for your project
Make your code great again
- Eslint
First of all we need to install eslint and configs as dev dependencies. You can use your own config, but I will use config from airbnb:
yarn add -D eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react