Skip to content

Instantly share code, notes, and snippets.

View midorikocak's full-sized avatar
😎
cool

Midori Kocak midorikocak

😎
cool
  • Prague
View GitHub Profile
@midorikocak
midorikocak / .gitignore
Created January 29, 2022 10:10
git ignore for express and node
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
let innocentVariable = "princess";
function innocentFunction(param) {
console.log(`innocent function is running`);
console.log(`who is ${param}`);
console.log(
"innocent function removed from the callback and not calling another function"
);
}
@midorikocak
midorikocak / callback.js
Created January 25, 2022 09:26
Callback repeat
let songs = ["Nothing else matters", "Baby, one more time", "Laura non c'è"];
function haveAParty(musicPlayer, songs, neighborsComplained) {
if (neighborsComplained === false) {
songs.forEach((song) => {
musicPlayer(song);
});
}
}
@midorikocak
midorikocak / examples.sql
Created January 22, 2022 13:31
SQL QUERY EXAMPLES
USE almodovar;
# INSERTION
# INSERT INTO roles (name) VALUES ('admin');
# INSERT INTO roles (name) VALUES ('user');
# INSERT INTO users (email, username, password, role_id) VALUES ('marta@gmail.com', 'marta', '123456', '2');
# CHANGE STRUCTURE
@midorikocak
midorikocak / model.js
Created December 18, 2021 11:40
Express model class recap
let artwork = {
id: "1",
name: "Starry Night",
description:
"The Starry Night is an oil-on-canvas painting by the Dutch Post-Impressionist painter Vincent van Gogh. Painted in June 1889, it depicts the view from the east-facing window of his asylum room at Saint-Rémy-de-Provence, just before sunrise, with the addition of an imaginary village.",
format: "Oil on Canvas",
artist: 'Vincent Van Gogh',
year: '1899',
width: "73",
length: "32",
@midorikocak
midorikocak / countries.js
Created November 18, 2021 07:06
Country Codes
const countries = {
AF: "Afghanistan",
AX: "Aland Islands",
AL: "Albania",
DZ: "Algeria",
AS: "American Samoa",
AD: "Andorra",
AO: "Angola",
AI: "Anguilla",
AQ: "Antarctica",
@midorikocak
midorikocak / index.html
Last active October 23, 2021 12:06
Confirm, Prompt and Alert (Be careful, they are blocking)
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]> <html class="no-js"> <!--<![endif]-->
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title></title>
@midorikocak
midorikocak / index.html
Created October 6, 2021 19:49
Structured Data example
<!DOCTYPE html>
<html lang="en">
<head>
<title>Midori Kocak</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="/css/stylesheet.css" />
<style>
.resume-name {
color: #ffff00;
}
@midorikocak
midorikocak / index.html
Last active October 4, 2021 19:37
Introduction to HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>My First Webpage</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"
/>
<style>
body {
@midorikocak
midorikocak / composeObjects.js
Last active September 25, 2021 12:46
Object Composition
let person = {
name: 'midori',
hobbies: ['climbing', 'anime', 'playing piano', 'learning japanese']
}
let teacher = {
topic: 'coding',
years: 10
}