Skip to content

Instantly share code, notes, and snippets.

View korrio's full-sized avatar
👽

kOrriO korrio

👽
  • Hal Finney Co.,Ltd.
  • mempool
  • X @korrio
View GitHub Profile
@korrio
korrio / falsehoods-programming-time-list.md
Created September 17, 2023 23:06 — forked from timvisee/falsehoods-programming-time-list.md
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@korrio
korrio / DamnSimpleNftStake.sol
Created April 1, 2022 03:58 — forked from Chmarusso/DamnSimpleNftStake.sol
Super Simple NFT staking
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol";
contract NftStaker {
IERC1155 public parentNFT;
struct Stake {
@korrio
korrio / FoodToken.sol
Last active February 5, 2021 14:42 — forked from MicahZoltu/FoodToken.sol
Testnet Tokens
pragma solidity >= 0.7.0;
contract FoodToken {
uint256 constant public totalSupply = 10_000_000 * 10**18;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
string constant public symbol = "FOOD";
uint8 constant public decimals = 18;
string constant public name = "Food Token";
// Copy paste this script on your console
var disabled = false;
var r = confirm('Start the Autolike on this page?');
var min_time_to_decide = 300;
var max_additional_time_to_decide = 1000;
var time_to_decide = function() {
additional_time_to_decide = Math.floor(Math.random() * max_additional_time_to_decide);
return min_time_to_decide + additional_time_to_decide;
const express = require('express');
const server = express();
const request = require('request');
const proxy = require('http-proxy-middleware');
server.set('view engine', 'ejs');
const createProxy = (path, target) =>
server.use(path, proxy({ target, changeOrigin: true, pathRewrite: {[`^${path}`]: ''} }));
@korrio
korrio / README.md
Created November 6, 2018 09:20 — forked from clhenrick/README.md
PostgreSQL & PostGIS cheatsheet (a work in progress)
Solidity lets you program on Ethereum, a blockchain-based virtual machine that allows the creation and execution of smart contracts, without needing centralized or trusted parties.
Solidity is a statically typed, contract programming language that has similarities to Javascript and C. Like objects in OOP, each contract contains state variables, functions, and common data types. Contract-specific features include modifier (guard) clauses, event notifiers for listeners, and custom global variables.
Some Ethereum contract examples include crowdfunding, voting, and blind auctions.
As Solidity and Ethereum are under active development, experimental or beta features are explicitly marked, and subject to change. Pull requests welcome.
// First, a simple Bank contract
// Allows deposits, withdrawals, and balance checks
// simple_bank.sol (note .sol extension)
/* **** START EXAMPLE **** */
@korrio
korrio / java Bank Account Management Project.
Last active February 4, 2018 07:54 — forked from shohan4556/java Bank Account Management Project.
java Bank Account Management Project.
import java.util.*;
/**
*
* @author Shohan
* Bank Account Class
* // Main ClassName -- "Main"
* // Add interest feature by @korrio
*/
class Account{
@korrio
korrio / media-query.css
Created December 14, 2017 05:43 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@korrio
korrio / demo.java
Last active November 12, 2017 15:49 — forked from anonymous/demo.java
fork
package com.locationupdates.event;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.Button;