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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://unpkg.com/mocha@8/mocha.css" /> | |
<link rel="stylesheet" href="style.css" /> | |
<script |
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
npm install postcss-cli postcss-import postcss-media-minmax postcss-csso | |
npx postcss styles/index.css --use postcss-import --use postcss-media-minmax --use postcss-csso --no-map --output styles/index.min.css | |
Источник: https://youtu.be/0_v36dyI3kI?t=842 |
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
npx jscpd --ignore 'node_modules/**/*' . |
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
import { Select, Spin } from 'antd'; | |
import { IProfile } from 'modules/user/types'; | |
import React, { useState } from 'react'; | |
import debounce from 'lodash/debounce'; | |
import uniqWith from 'lodash/uniqWith'; | |
const { Option } = Select; | |
interface IResponse { |
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
import React, { useState, useEffect } from 'react'; | |
function useFriendStatus(friendID) { | |
const [isOnline, setIsOnline] = useState(null); | |
function handleStatusChange(status) { | |
setIsOnline(status.isOnline); | |
} | |
useEffect(() => { |
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
//@flow | |
import React, { useState, useEffect } from 'react'; | |
type IProps = { | |
initial?: number, | |
}; | |
export default function HookExample({ initial = 0 }: IProps) { | |
const [fuckingCount, setFuckingCount] = useState(initial); |
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
import fs from 'fs'; | |
const print1 = path => { | |
fs.readFile(path, (err, content) => console.log(content.toString())); | |
} | |
const print2 = path => fs.readFile( | |
path, | |
'utf-8', | |
(error, data) => console.log(data), |
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 propertyActions = [ | |
{ | |
name: 'body', | |
check: arg => typeof arg === 'string' | |
}, | |
{ | |
name: 'children', | |
check: arg => arg instanceof Array | |
}, | |
{ |
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 metadata = { | |
title: 'Scratchpad', | |
translations: [ | |
{ | |
locale: 'de', | |
title: 'Javascript-Umgebung' | |
} | |
], | |
url: '/en-US/dosc/Tools/Scratchpad' | |
}; |
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
// SERVER | |
const axios = require('axios'); | |
module.exports = () => { | |
const io = require('socket.io')(); | |
io.listen(3000); | |
io.on('connection', function(socket) { | |
socket.on('SEARCH_REQUEST', query => { | |
axios |
NewerOlder