Skip to content

Instantly share code, notes, and snippets.

View DanielCeron-dc's full-sized avatar
🟣
Focusing

Daniel Cerón DanielCeron-dc

🟣
Focusing
View GitHub Profile
CREATE EVENT deleteReport${reportCreated.id}
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MINUTE
DO
DELETE FROM reports WHERE id = ${reportCreated.id};
console.log('\x1b[36m%s\x1b[0m', 'cyan'); // cyan color
console.log('\x1b[33m%s\x1b[0m', 'yellow'); //yellow
console.log('\x1b[32m%s\x1b[0m', 'green'); // green
console.log('\x1b[31m%s\x1b[0m', 'red'); // red
console.log('\x1b[35m%s\x1b[0m', 'magenta'); // magenta
console.log('\x1b[34m%s\x1b[0m', 'blue'); // blue
console.log('\x1b[37m%s\x1b[0m', 'white'); // white
console.log('\x1b[90m%s\x1b[0m', 'gray'); // gray
console.log('\x1b[95m%s\x1b[0m', 'lightgray'); // lightgray
console.log('\x1b[96m%s\x1b[0m', 'lightblue'); // lightblue
@DanielCeron-dc
DanielCeron-dc / useTheme.tsx
Last active March 24, 2022 21:43
useTheme
import React, { useEffect } from 'react';
const changeCssVariable = (name: string, value: string) => {
document.documentElement.style.setProperty(name, value);
};
const changeTheme = (type: 'light' | 'black' | 'dark') => {
switch (type) {
case 'light':
changeCssVariable('--color1', 'white');
@DanielCeron-dc
DanielCeron-dc / Loader.module.css
Last active March 24, 2022 21:43
loading box
.loader {
position: relative;
width: 200px;
height: 200px;
background-color: rgb(31, 31, 31);
display: flex;
justify-content: center;
align-items: center;
transition: .5s;
color: white;
@DanielCeron-dc
DanielCeron-dc / PageUnderConstruction.module.css
Last active October 12, 2021 16:01
PageUnderContruction Component
.base {
position: fixed;
bottom: 0;
right: 0;
display: flex;
justify-content: center;
align-items: center;
margin: 1rem;
width: 20rem;
height: 5rem;
@DanielCeron-dc
DanielCeron-dc / Navbar.tsx
Last active October 3, 2021 00:03
Navbar on react with sticky
import React, { CSSProperties } from "react";
const style: CSSProperties = {
backgroundColor: "var(--secondary)",
height: 50,
width: "100%",
display: "flex",
position: "sticky",
top: 0,
left: 0,
@DanielCeron-dc
DanielCeron-dc / Navbar.module.css
Last active October 3, 2021 16:16
Navbar for react app
.navbar {
background: var(--secondary);
height: 60px;
position: sticky;
display: flex;
top: 0;
left: 0;
z-index: 2;
justify-content: flex-end;
align-items: flex-start;
@DanielCeron-dc
DanielCeron-dc / body.css
Created October 2, 2021 18:45
body-react
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@DanielCeron-dc
DanielCeron-dc / variables.css
Last active October 3, 2021 02:06
css-variables
/* this is the css file for the variables.css file */
:root {
--primary: #36393f;
--primary-dark: #2f3136;
--secondary: mediumseagreen; /* navbars */
--secondary-dark: rgb(40, 122, 77);
--tertiary: #34568B;
--tertiary-dark: #29446e;
--quaternary: #FF6F61;
--quaternary-dark: #cc564b;
interface IValue {
value: string;
key: string;
}
class localStorageList {
values: IValue[] = [];
key: string;
constructor(key: string) {