Skip to content

Instantly share code, notes, and snippets.

View vsim1964's full-sized avatar

Vladimir Siminenko vsim1964

  • Taganrog
  • 11:21 (UTC +03:00)
View GitHub Profile
@vsim1964
vsim1964 / fetch.js
Last active August 19, 2023 12:48
AJAX
fetch('ваш_url', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ваш_токен'
}
})
.then(response => {
if (!response.ok) {
throw new Error(`Ошибка сети: ${response.status} ${response.statusText}`);
@vsim1964
vsim1964 / 0.md
Last active August 19, 2023 12:32
ОШИБКИ В JAVASCRIPT

‎‎​

@vsim1964
vsim1964 / i.pug
Last active April 12, 2023 11:12
pug
doctype html
html(lang="en")
head
meta(charset="UTF-8")
meta(name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no")
title Document
link(rel="stylesheet", href="css/style.css")
body
header.header
.container
@vsim1964
vsim1964 / bg-fixed.css
Last active August 27, 2022 19:07
Cover. Фиксированный бекграунд
.bg-fixed {
width: 100%;
height: 100vh;
background: #333 url('img/mountains.jpg');
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
background-attachment: fixed;
overflow: hidden;
}
@vsim1964
vsim1964 / normalize-cdn.html
Last active August 18, 2022 14:59
Шаблон normalize-cdn
<!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://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"
integrity="sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w=="
@vsim1964
vsim1964 / class.jsx
Created August 12, 2022 15:55
React__4 Class
import React, { Component } from 'react'
export default class Clicker extends Component {
// constructor(props) {
// super(props)
// this.state = {
// count: 0
// }
// }
state = {
@vsim1964
vsim1964 / class.jsx
Created August 12, 2022 11:41
React__3. Class
import React, { Component } from 'react';
import './item.css'
export default class PostItem extends Component {
constructor(props) {
super(props);
this.state = { important: false, like: false, };
this.onImportant = this.onImportant.bind(this);
this.onLike = this.onLike.bind(this);
@vsim1964
vsim1964 / index.js
Created August 12, 2022 11:38
React__2. Index.js
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './components/app/App';
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
@vsim1964
vsim1964 / react__1.jsx
Last active August 12, 2022 11:37
React__ 1 Components
// rcc
import React, { Component } from 'react'
export default class react__1 extends Component {
render() {
return (
<div>react__1</div>
)
}
}
// rce
@vsim1964
vsim1964 / вва
Created August 12, 2022 11:19
ака
‎‎​