Skip to content

Instantly share code, notes, and snippets.

View andresaaap's full-sized avatar

Alvaro Andres Pinzon Cortes andresaaap

View GitHub Profile
/*
* Create a list that holds all of your cards
*/
var cards = ["fa-diamond", "fa-diamond", "fa-paper-plane", "fa-paper-plane", "fa-anchor", "fa-anchor", "fa-bolt", "fa-bolt", "fa-cube", "fa-cube", "fa-leaf", "fa-leaf", "fa-bicycle", "fa-bicycle", "fa-bomb", "fa-bomb"];
var clicked_cards = [];
var counter = 0;
var moves = 0;
var clicked_card_id = 0;
var score = 0;
'use strict';
//_______________________
//_______________________
//NEW CLASSES
class Game {
constructor() {
const clickCountButton = document.getElementById('clickCountButton');
const clicks = document.querySelector('.numClicks');
/* ======= Model (data) ======= */
var model = {
currentCat: " ",
catsList: [
{ catName: 'Luna', src:'https://cdn.pixabay.com/photo/2018/07/13/10/20/cat-3535404_1280.jpg',
alt:'alternative image 1 text', attribute:'source of image 1', clickCount:0 },
{ catName: 'Jynx', src:'https://cdn.pixabay.com/photo/2017/02/20/18/03/cat-2083492_1280.jpg',
import React, { Component } from "react";
import escapeRegExp from 'escape-string-regexp'
import sortBy from 'sort-by'
class ListItems extends Component {
state = {
query: ''
}
updateQuery = (query) => {
@andresaaap
andresaaap / truffle.js
Created March 27, 2019 18:41
Example of a correct configuration of a provider to the Rinkeby Testnet
const HDWalletProvider = require("truffle-hdwallet-provider");
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*" // Match any network id
},
rinkeby: {
@andresaaap
andresaaap / config.yml
Created June 17, 2019 19:01
Operationalize a Machine Learning Microservice, CircleCI
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
# Use the same Docker base as the project
- image: python:3.7.3-stretch
@andresaaap
andresaaap / button-round-boarder-blue-shadow.component.html
Created June 18, 2019 16:34
Create button component with text set by parameter | Angular
<button class="button--color-blue">
<div><span>{{title}}</span></div>
</button>
@andresaaap
andresaaap / script.yml
Last active March 30, 2020 16:16
UserDate for Udacity Cloud DevOps Deploy a high-availability web app using CloudFormation Project
UserData:
Fn::Base64: !Sub |
#!/bin/bash -xe
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
apt update -y
apt install -y apache2
systemctl start apache2
systemctl enable apache2
rm ../../var/www/html/index.html
wget -P ../../var/www/html https://s3.us-east-2.amazonaws.com/test-udagram-1/index.html
pragma solidity ^0.5.0;
import 'openzeppelin-solidity/contracts/utils/Address.sol';
import 'openzeppelin-solidity/contracts/drafts/Counters.sol';
import 'openzeppelin-solidity/contracts/math/SafeMath.sol';
import 'openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol';
import "./Oraclize.sol";
contract Ownable {
// TODO's
@andresaaap
andresaaap / gist:8ed77882a81ef2e071b807eea9c0ddbb
Created May 13, 2021 03:15
Error log - IntelliJ error: invalid target release: 14
/Users/alvaroandrespinzoncortes/Library/Java/JavaVirtualMachines/corretto-11.0.11/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/Users/alvaroandrespinzoncortes/Documents/Udacity/Mentor/Java programming/Udasecurity/nd079-c3-java-application-deployment-projectstarter/starter/catpoint-parent -Dmaven.home=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3 -Dclassworlds.conf=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/bin/m2.conf -Dmaven.ext.class.path=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven-event-listener.jar -javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=62224:/Applications/IntelliJ IDEA CE.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds.license:/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version=2021.1.1 -e packag