Skip to content

Instantly share code, notes, and snippets.

View dicethedev's full-sized avatar
🚀
Learning & Building

Blessing Samuel dicethedev

🚀
Learning & Building
View GitHub Profile
@dicethedev
dicethedev / index.jsx
Last active April 24, 2023 10:59
possible solution to make the NFT images load faster
//--------------------------------- Method 1 ----------------------------------------
//Here's an example of how you can use the fetch function to fetch an NFT from Pinata:
//In this example, the NFTImage component takes an nftHash prop that represents the hash of the NFT on Pinata.
//The component uses the useState and useEffect hooks to fetch the NFT image from Pinata using the fetch function.
// If the HTTP response is successful, the component sets the image URL in state using the setImageUrl function,
// and renders an img element with the src attribute set to the image URL.
//If the image URL is not available yet, the component displays a "Loading NFT..." message.
@dicethedev
dicethedev / myFindings.md
Last active March 17, 2023 09:30
Findings report

Finding

Risk rating * Medium Risk

Title * Summarize your findings for the bug or vulnerability. (This will be the issue title.)

Here are some potential security vulnerabilities that I have identified in this particular contract (BytecodeCompressor.sol)

{"v":"5.7.11","fr":30,"ip":0,"op":60,"w":512,"h":512,"nm":"Bouncy Fail","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"X line 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90,"ix":10},"p":{"a":0,"k":[256,256,0],"ix":2,"l":2},"a":{"a":0,"k":[41,-3,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[112,-74],[-30,68]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":40,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.38823529411764707,0.2784313725490196,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,
@dicethedev
dicethedev / Connect2Phantom.tsx
Created February 7, 2023 14:07 — forked from jmlon/Connect2Phantom.tsx
Example connection to the Phantom wallet for the solana_part1 tutorial
import { FC, useEffect, useState } from "react";
import { Connection, PublicKey, clusterApiUrl } from "@solana/web3.js";
type PhantomEvent = "disconnect" | "connect" | "accountChanged";
interface ConnectOpts {
onlyIfTrusted: boolean;
}
<template>
<h1>Color Picker Game</h1>
<div>{{ message }}</div>
<button v-for="color in colors" :key="color" @click="matchColor(color)">
{{ color }}
</button>
</template>
@dicethedev
dicethedev / MyToken.sol
Created January 17, 2023 14:05 — forked from shobhitic/MyToken.sol
ERC20 Permit OpenZeppelin Tutorial - https://www.youtube.com/watch?v=lFKcga4Y6Ys
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts@4.7.3/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts@4.7.3/token/ERC20/extensions/draft-ERC20Permit.sol";
contract MyToken is ERC20, ERC20Permit {
constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}
function mint(address to, uint256 value) external {
import {
Accordion,
AccordionButton,
AccordionIcon,
AccordionItem,
AccordionPanel,
Avatar,
Box,
Button,
Center,
@dicethedev
dicethedev / readme.md
Created November 21, 2022 02:59
My Answer

1) Why do you think you are a good fit for this role?

My skill set matches all the requirements laid out in the job description. In particular, my ability to work to tight deadlines and manage my time effectively make me a good fit for the role. For example, in my current job I have to manage my own workload and tasks, taking briefs from colleagues in multiple and projects departments and creating a priority order that keeps everyone satisfied. Having been in the job for 6 months, I have never missed a deadline.

2) Why would you like to work on Kleros?

@dicethedev
dicethedev / index.html
Created November 19, 2022 16:48
How do I make the left div align to left and right div align to right
<html>
<head>
<title>How do I make the left div align to left and right div align to right</title>
<style>
div {
display: flex;
justify-content: space-between;
}
.left {
@dicethedev
dicethedev / index.css
Last active November 19, 2022 16:25
Write the CSS code for hiding a div with the class hero only on mobile phone and tablet
/* mobile device */
@media only screen and (max-width:320px) {
.hero {
width: 28%;
display: none;
visibility: hidden;
clear: both;
float: left;
margin: 10px auto 5px 20px;