Skip to content

Instantly share code, notes, and snippets.

View leovafme's full-sized avatar
🏠
Working from home

Leonardo Valencia leovafme

🏠
Working from home
View GitHub Profile
@leovafme
leovafme / contracts...ClaySheriff.sol
Created January 31, 2023 20:14
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=undefined&optimize=undefined&runs=undefined&gist=
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import {
ERC2771Context
} from "@gelatonetwork/relay-context/contracts/vendor/ERC2771Context.sol";
import "./interfaces/ILuckyBonnieBank.sol";
contract ClaySheriff is ERC2771Context {
ILuckyBonnieBank immutable bank;
@leovafme
leovafme / loading_line_bar.html
Created March 6, 2018 19:43
animation css line bar
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 35px;
height: 10px;
border-radius: 5px;
background: red;
position: relative;
@leovafme
leovafme / schema.js
Created February 1, 2018 19:30 — forked from simenbrekken/schema.js
Firebase backed GraphQL schema
import firebase from 'firebase'
import { filter, map } from 'lodash'
import { makeExecutableSchema } from 'graphql-tools'
firebase.initializeApp({
databaseURL: 'https://grafire-b1b6e.firebaseio.com',
})
const mapSnapshotToEntity = snapshot => ({ id: snapshot.key, ...snapshot.val() })
const mapSnapshotToEntities = snapshot => map(snapshot.val(), (value, id) => ({ id, ...value }))
<div class="wrapper">
<ul class="StepProgress">
<li class="StepProgress-item is-done"><strong>Post a contest</strong></li>
<li class="StepProgress-item is-done"><strong>Award an entry</strong>
Got more entries that you love? Buy more entries anytime! Just hover on your favorite entry and click the Buy button
</li>
<li class="StepProgress-item is-done"><strong>Post a contest</strong></li>
<li class="StepProgress-item current"><strong>Handover</strong>
Got more entries that you love? Buy more entries anytime! Just hover on your favorite entry and click the Buy button
</li>
@leovafme
leovafme / index.html
Created August 16, 2017 14:16
login bootstrap4
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Login Form</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
@leovafme
leovafme / index.html
Created August 16, 2017 14:16
login bootstrap4
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Login Form</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
@leovafme
leovafme / file.css
Last active August 13, 2017 04:47
bootstrap4
.icola{
margin: 25px;
font-size: 15px;
margin-top: 10px;
margin-bottom: 10px;
color: #fff;
}
.icola.active{
color: #e8ab16;
@leovafme
leovafme / index.html
Last active July 5, 2017 15:38
input material bootstrap 4
<style>
body {
padding: 20px;
}
/* --- material floating label --- */
.form-group {
display: flex;
height: 55px;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="/handsontable/dist/handsontable.full.js"></script>
<link rel="stylesheet" media="screen" href="/handsontable/dist/handsontable.full.css">
<title>Document</title>
var now = moment(new Date()); //todays date
setTimeout(e=>{ var end = moment(new Date()); // another date
var duration = moment.duration(end.diff(now));
var days = duration.asSeconds();
console.log(days)}, 3400)