Skip to content

Instantly share code, notes, and snippets.

View jahvi's full-sized avatar
👨‍💻
Deep in the code

Javier Villanueva jahvi

👨‍💻
Deep in the code
View GitHub Profile
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "erc721a/contracts/ERC721A.sol";
import "erc721a/contracts/extensions/ERC721AQueryable.sol";
contract Token is ERC721A, ERC721AQueryable {
enum TokenTypes {
None,
Fist,
@jahvi
jahvi / .deps...github...OpenZeppelin...openzeppelin-contracts...contracts...access...Ownable.sol
Created September 24, 2021 19:24
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
@jahvi
jahvi / .deps...github...OpenZeppelin...openzeppelin-contracts...contracts...access...Ownable.sol
Created September 17, 2021 17:10
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
@jahvi
jahvi / config.yaml
Created September 12, 2015 18:22
PuPHPet Magento 1 and 2 config
vagrantfile:
target: local
vm:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
hostname: vagrant.dev
memory: '768'
cpus: '1'
chosen_provider: virtualbox
network:
@jahvi
jahvi / Vagrantfile
Created September 6, 2015 19:28
Basic LAMP stack Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Edit these
hostname = "vagrant.dev"
server_ip = "192.168.33.10"
mysql_root_password = "root"
Vagrant.configure(2) do |config|
# OS to install on VM
<script>
export default {
async asyncData ({ store, route }) {
// ...
// Prefetch CMS data on the server
await store.dispatch('cmsBlock/list', {
filterValues: ['home_banner'] // Array of CMS blocks identifiers on the page
})
}
}
<template>
<div
class="offer-container col-xs-12 col-sm-6 pb15"
v-if="data"
>
<router-link :to="localizedRoute(link)">
<div
class="offer"
v-lazy:background-image="image"
>
<template>
<section v-if="!singleBanner" class="offers container my30 px15 cl-black">
<div class="row">
<left-banner :identifier="'home_banner'" />
<!-- ... -->
</div>
</section>
</template>
import { parse } from 'node-html-parser';
const root = parse('<ul id="list"><li>Hello World</li></ul>');
console.log(root.firstChild.structure);
// ul#list
// li
// #text
console.log(root.querySelector('#list'));
<template>
<section v-if="!singleBanner" class="offers container my30 px15 cl-black">
<div class="row">
<cms-block :identifier="'home_banner'" />
<!-- ... -->
</div>
</section>
</template>