Skip to content

Instantly share code, notes, and snippets.

Avatar
🇨🇴
gndx.dev

Oscar Barajas Tavares gndx

🇨🇴
gndx.dev
View GitHub Profile
View README.md

random-messages

Whenever I start a new project, I don't know what to write for the first commit. After doing a “git init” there is technically nothing there...

Install

npm install -g random-msg
View initalState.json
{
"initalState": {
"mylist": [],
"trends": [
{
"id": 2,
"slug": "tvshow-2",
"title": "In the Dark",
"type": "Scripted",
"language": "English",
View gitignore
# Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
View eslintrc
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": ["airbnb"],
"globals": {
"document": false,
"escape": false,
View for.js
const products = [
{ id: "1", name: "shirt", category: "clothing" },
{ id: "2", name: "Sports Tennis", category: "accessories" },
{ id: "3", name: "Casual shoes", category: "footwear" },
{ id: "4", name: "skirt", category: "clothing" },
{ id: "5", name: "tie", category: "clothing" }
]
let nameOfProducts = [];
View pets-db.json
{
"pets": {
"0": {
"adopt": true,
"date": "2019-03-29T04:07:28.238Z",
"description": "Tata es un gatita de 3 años",
"gender": "female",
"name": "Tata",
"photo": "http://s3.amazonaws.com/chewiekie/img/tata.png",
"profilePic": "https://graph.facebook.com/10156355067184077/picture",
View global.css
@import url("https://fonts.googleapis.com/css?family=Roboto:100,300,400");
@import url("https://use.fontawesome.com/releases/v5.7.2/css/all.css");
body {
margin: 0;
padding: 0;
background-color: #f4f8fb;
font-family: 'Roboto', sans-serif;
color: #8c93bd;
}
@gndx
gndx / cssreset.css
Created Feb 21, 2018
CSS: html5 doctor css reset
View cssreset.css
/*
* html5 doctor css reset | http://html5doctor.com/html-5-reset-stylesheet
*/
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}
body{line-height:1}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}
nav ul{list-style:none}
blockquote,q{quotes:none}
blockquote:before,blockquote:after,q:before,q:after{content:none}
a{margin:0;padding:0;font-size:100%;vertical-align:baseline;background:transparent}
View Firebase.js
import firebase from 'firebase';
const config = {
apiKey: "unreadablestuff",
authDomain: "your-project-name.firebaseapp.com",
databaseURL: "https://your-project-name.firebaseio.com",
projectId: "your-project-name",
storageBucket: "your-project-name.appspot.com",
messagingSenderId: "0112358132134"
};
@gndx
gndx / App.jsx
Last active Jun 13, 2019
Formulario de contacto con React + Firebase
View App.jsx
// Añadimos React & nuestro archivo de configuración
import React, { Component } from 'react';
import firebaseConf from './Firebase';
class App extends Component {
// inicializamos nuestro estado inicial
constructor(props) {
super(props);
this.state = {