Skip to content

Instantly share code, notes, and snippets.

View Hacking-NASSA-with-HTML's full-sized avatar
🚀
Dream big and work hard. You can get anything you wish for!

Vyacheslav Plekhanov Hacking-NASSA-with-HTML

🚀
Dream big and work hard. You can get anything you wish for!
View GitHub Profile
const wakeUpLazyAzz = async () => {
try {
const response = await fetch('https://render-back-end-nikky-pedia.onrender.com/')
// const body = await response.text()
// console.log(response.ok)
// console.log(response.status)
// console.log(body)
} catch (error) {
console.log(error)
}
<!DOCTYPE html>
<html lang="ru-RU" prefix="og: http://ogp.me/ns#">
<head>
<!-- Required -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, maximum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="cleartype" content="on">
<meta http-equiv="msthemecompatible" content="no">
@Hacking-NASSA-with-HTML
Hacking-NASSA-with-HTML / transition.js
Created January 4, 2023 21:15
manipulation CSS transition property with JavaScript syntax.
resultsDiv.style.transition = '4s'
resultsDiv.style.transition = 'none'
resultsDiv.style.opacity = '1'
@Hacking-NASSA-with-HTML
Hacking-NASSA-with-HTML / robotClick.js
Created December 29, 2022 16:36
Robot click script
(() => {
let delay = 0
const jobs = document.querySelectorAll(".your-classes")
jobs.forEach(job => {
setTimeout(() => {
job.click()
}, delay)
delay += 2000
})
})()
@Hacking-NASSA-with-HTML
Hacking-NASSA-with-HTML / App.js
Created December 29, 2022 16:27
App js React example
import './App.css';
function App() {
const title = 'Welcome to the blog!'
const likes = 50
// const person = { name: 'Yoshi', age: 30 }
const link = "https://google.com"
return (
<div className="App">
@Hacking-NASSA-with-HTML
Hacking-NASSA-with-HTML / cycle.js
Last active December 25, 2022 10:34
Self invoking function via setTimeout
// option 1
(function cycle(i){
console.log("tick, ID: " + i);
setTimeout(cycle, 2000, i+1);
})(0);
// option 2
(function cycle() {
document.querySelector(".css-1ewhobe").click()
@Hacking-NASSA-with-HTML
Hacking-NASSA-with-HTML / reverseOrderOfCharacters.js
Last active December 18, 2022 18:31
Function to reverse the order of characters in a word:
// function to reverse the order of characters in a word:
function reverse(word) {
let reversedWord = ''
for (let i = word.length - 1; i >= 0; i--) {
reversedWord = reversedWord.concat(word[i])
}
return reversedWord
}
console.log(reverse('word')) // prints drow
@Hacking-NASSA-with-HTML
Hacking-NASSA-with-HTML / arrayDestructuring.js
Created December 17, 2022 21:36
Using array destructuring, fix the following code to print the keys and values of the `members` Map
// Using array destructuring, fix the following code to print the keys and values of the `members` Map to the console.
const members = new Map()
members.set('Evelyn', 75.68)
members.set('Liam', 20.16)
members.set('Sophia', 0)
members.set('Marcus', 10.25)
let key
let value
@Hacking-NASSA-with-HTML
Hacking-NASSA-with-HTML / JavascriptSnippets.js
Last active December 17, 2022 21:40
Javascript snippets
// Summation of two variables
let firstName = 'John',
lastName = 'Doe';
let greeting = `Hi ${firstName}, ${lastName}`;
console.log(greeting); // Hi John, Doe
// Observer
@Hacking-NASSA-with-HTML
Hacking-NASSA-with-HTML / GitCommitEmoji.md
Created March 24, 2020 12:10 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji