Skip to content

Instantly share code, notes, and snippets.

View Alexisvt's full-sized avatar
🎯
Focusing

Alexis Villegas Torres Alexisvt

🎯
Focusing
  • San Jose, Costa Rica
View GitHub Profile
@dabit3
dabit3 / Market.sol
Last active May 18, 2022 21:06
Metaverse Marketplace Smart Contract
// contracts/Market.sol
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.3;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "hardhat/console.sol";
@dabit3
dabit3 / NFT.sol
Last active March 6, 2022 22:44
Basic NFT Smart Contract
// contracts/NFT.sol
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.3;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "hardhat/console.sol";
@dabit3
dabit3 / storage.js
Created February 17, 2021 19:31
Example uploading / downloading files with S3, Amplify, & React
import { useState, useEffect } from 'react'
import { Storage } from 'aws-amplify'
function App() {
const [images, setImages] = useState([])
useEffect(() => {
fetchImages()
}, [])
async function fetchImages() {
let imageKeys = await Storage.list('')
@Alexisvt
Alexisvt / moment-sample.js
Last active July 15, 2020 16:13
Code snippet showing how to transform a regular date to UTC and vice versa.
const moment = require('moment');
const regularDate = moment() // ?
const regularDateString = regularDate.format('YYYY-mm-DD HH:ss'); // ?
const utcDate = moment.utc() // ?
const utcString = utcDate.format('YYYY-mm-DD HH:ss') //?
// transforming regular to UTC
console.log(moment.utc(regularDate).format('YYYY-mm-DD HH:ss')) // ?
@ivantw08
ivantw08 / angular material
Last active November 25, 2021 22:28
A module with all Angular module.
//Simply to import to app.module.ts and start to use all angular
// by this way is easier to maintenance you app.module
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MatCheckboxModule} from '@angular/material';
import {MatButtonModule} from '@angular/material';
import {MatInputModule} from '@angular/material/input';
import {MatAutocompleteModule} from '@angular/material/autocomplete';
import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatFormFieldModule} from '@angular/material/form-field';
@jonlabelle
jonlabelle / docker_compose_cheatsheet.md
Last active May 31, 2024 13:30
Docker Compose Cheatsheet
@curtismckee
curtismckee / git-stash.md
Last active March 9, 2021 02:46
Git Stash Cheatsheet

git stash list

  • Lists all stashes on stack.

git stash apply stash@{0}

  • Applies the changes from stash but does not delete from stack.

git stash pop stash@{3}

  • Applies the changes from stash and deletes from the stack.

git stash -m "Message goes here." -- $(git diff --staged --name-only)

@rimatla
rimatla / TSLInt-Prettier-CreateReactApp-TypeScript-setup.md
Last active May 17, 2024 09:44
Create React App + TypeScript Linting with TSLint and Prettier setup on VSCode

Ps: The current setup was done on 01-04-19

Project Dependency Versions at the time 👇

  "react": "^16.7.0",
  "react-dom": "^16.7.0",
  "react-scripts": "2.1.3",
  "typescript": "^3.2.2"
  "tslint": "^5.12.0",
  "tslint-config-prettier": "^1.17.0",
@agcty
agcty / settings.json
Last active December 26, 2019 11:47
VSCode settings file
{
"editor.formatOnSave": true,
"vetur.validation.template": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
@bradtraversy
bradtraversy / docker-help.md
Last active June 28, 2024 04:54
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info