Skip to content

Instantly share code, notes, and snippets.

View silavsale's full-sized avatar
😇
_yo

Sergiy Rudenko silavsale

😇
_yo
  • Canada
  • 17:31 (UTC -04:00)
View GitHub Profile
import { useState, useEffect, useRef } from 'react';
// import { HideUntilLoaded } from 'react-animation';
import PropTypes from 'prop-types';
import Spinner from '../spinner/Spinner';
import ErrorMessage from '../errorMessage/ErrorMessage';
import MarvelServices from '../services/MarvelServices';
import './charlist.scss';
@bradtraversy
bradtraversy / stack.js
Created May 29, 2020 14:35
Stack data structure
class Stack {
constructor() {
this.items = []
this.count = 0
}
// Add element to top of stack
push(element) {
this.items[this.count] = element
console.log(`${element} added to ${this.count}`)
@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active September 14, 2024 16:50
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@keithweaver
keithweaver / Home.js
Last active September 7, 2022 07:27
Sign up/in form in React.js
import React, { Component } from 'react';
import 'whatwg-fetch';
import {
getFromStorage,
setInStorage,
} from '../../utils/storage';
class Home extends Component {
constructor(props) {
@cviebrock
cviebrock / .powerlevelrc
Last active October 15, 2020 03:14
PowerLevel9K configuration
# General
POWERLEVEL9K_MODE='nerdfont-complete'
POWERLEVEL9K_COLOR_SCHEME='dark'
# Prompts
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir virtualenv vcs)
else
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(root_indicator dir virtualenv vcs)
fi
@OlgaKulikova
OlgaKulikova / Lesson6_2.java
Last active February 8, 2017 04:59
Lesson6_2
package com.Lesson6;
// Дано текст и определенное слово. Посчитать сколько раз заданное слово встречается в тексте.
public class Lesson6_2 {
public static void main(String[] args) {
String text = "Ехал Грека через реку, видит Грека в реке рак, сунул Грека руку в реку, рак за руку Грека цап";
String word = "Грека";