Skip to content

Instantly share code, notes, and snippets.

View n1c01a5's full-sized avatar
🏗️
#BUILDING Web3 Devtool

n1c0 n1c01a5

🏗️
#BUILDING Web3 Devtool
View GitHub Profile
@viclafouch
viclafouch / modal.jsx
Last active January 23, 2023 21:14
An implementation of a Modal Component with React Hooks ! See https://react-modal.viclafouch.vercel.app
import React, { useEffect, useImperativeHandle, useState, forwardRef, useCallback } from 'react'
import { createPortal } from 'react-dom'
import './styles.css'
const modalElement = document.getElementById('modal-root')
export function Modal({ children, fade = false, defaultOpened = false }, ref) {
const [isOpen, setIsOpen] = useState(defaultOpened)
const close = useCallback(() => setIsOpen(false), [])
@brunobuddy
brunobuddy / BetDemocracy.sol
Created June 21, 2018 11:28
BetDemocracy V 0.1 Contract
pragma solidity 0.4.17;
import "./JsmnSolLib.sol";
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol";
import "github.com/Arachnid/solidity-stringutils/src/strings.sol";
contract BetDemocracy is usingOraclize {
using strings for *;
/**
* @title Rock Paper Scissors Lizard Spock
* @author Clément Lesaege - <clement@lesaege.com>
* @author Nicolas Wagner - <nicolas@kleros.io>
*/
/* This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
To Public License, Version 2, as published by Sam Hocevar. See

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@wojteklu
wojteklu / clean_code.md
Last active May 5, 2024 11:52
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules