Skip to content

Instantly share code, notes, and snippets.

@AyoAlfonso
AyoAlfonso / vanilla-js-cheatsheet.md
Created November 2, 2022 22:16 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet
@AyoAlfonso
AyoAlfonso / component.js
Created November 2, 2022 19:54 — forked from Chojiu15/component.js
index.js
import React, { useState, useEffect } from "react";
import axios from "axios";
const Test = () => {
const [data, setData] = useState([]);
const [land, setLand] = useState("");
const [pop, setPop] = useState({
country: "",
population: "",
year: "",
@AyoAlfonso
AyoAlfonso / text_nodes.js
Created October 30, 2022 14:48 — forked from mwunsch/text_nodes.js
Get the text nodes out of a document, ignoring the ones that are in Elements where the text value aren't likely to be valuable (like <script> tags) and nodes containing just whitespace.
function getLegitTextNodes() {
if (!document.createTreeWalker) return [];
var blacklist = ['SCRIPT', 'OPTION', 'TEXTAREA'],
textNodes = [],
walker = document.createTreeWalker(
document.body,
NodeFilter.SHOW_TEXT,
function excludeBlacklistedNodes(node) {
if (blacklist.indexOf(node.parentElement.nodeName.toUpperCase()) >= 0) return NodeFilter.FILTER_REJECT;
/**
Using input object type for mutations
**/
type Mutation {
register(input : createPersonInput!):RegisterUserResponse!
}
input createPersonInput{
name: String!
@AyoAlfonso
AyoAlfonso / responsive.css
Created December 27, 2019 04:59 — forked from codesynapse/responsive.css
Mobile responsive CSS
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
@AyoAlfonso
AyoAlfonso / media-query.css
Created December 27, 2019 04:59 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@AyoAlfonso
AyoAlfonso / media-query.css
Created December 27, 2019 04:59 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@AyoAlfonso
AyoAlfonso / media-query.css
Created December 27, 2019 04:59 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@AyoAlfonso
AyoAlfonso / sql-mongo_comparison.md
Created December 13, 2019 03:04 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.