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 / upload_slip_updated.js
Created January 12, 2024 23:14
upload_slip_updated.js
<script type="text/javascript">
$(function(){
function countdown() {
// Set the countdown date/time
var countDownDate = new Date().getTime() + 15 * 60 * 1000;
// Update the countdown every second
var countdownTimer = setInterval(function() {
// Get today's date/time
@korrio
korrio / upload_slip.js
Last active December 1, 2023 10:03
upload_slip.js
$(function(){
function decodeImageFromBase64(data, callback) {
// set callback
qrcode.callback = callback;
// Start decoding
qrcode.decode(data)
}
@korrio
korrio / dt.js
Created October 17, 2023 08:15
dt.js
function init($this) {
// For more options check out the Datatables Docs:
// https://datatables.net/extensions/buttons/
var buttons = ["copy", "print"];
// Basic options. For more options check out the Datatables Docs:
// https://datatables.net/manual/options
@korrio
korrio / datatables.js
Created October 17, 2023 07:53
datatables.js
'use strict';
var DatatableBasic = (function() {
// Variables
var $dtBasic = $('#datatable-basic');
var $dtBasic2 = $('#datatable-basic2');
let searchParams = new URLSearchParams(window.location.search)
@korrio
korrio / dashboardSlice.tsx
Last active October 4, 2023 03:32
dashboardSlice.tsx
import { createAsyncThunk, createSlice, Draft } from '@reduxjs/toolkit';
import { AppThunk, RootState } from '@/store/index';
import Http from '@/api/Http';
type DashboardState = {
title: string;
btc_pending: string;
btc_pending_usd: string;
capital: number;
your_income: string;
@korrio
korrio / dashboard.json
Created September 29, 2023 10:44
dashboard.json
{
"title": "Dashboard",
"balance": "0",
"referral_count": 0,
"contracts": [
{
"id": 138,
"user_id": 51,
"plan_id": 1,
"amount": 10,
@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 / export.php
Created December 19, 2017 10:02
export script for importing to woocommerce via product im-ex plugin
<?php
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', 1);
//error_reporting(E_ALL);
//aq1.co/wordpress/csv/export.php
require_once("_db.php");
$filename = 'export.xls'; // The file name you want any resulting file to be called
$db = new Database("wp_thg_import", "<YOUR-MYSQL-USERNAME>", "YOUR-MYSQL-PASSWORD", "localhost"); // $host is optional and defaults to 'localhost'
@korrio
korrio / useInterval.ts
Created May 16, 2023 01:41
useInterval.ts
import { useEffect, useRef } from 'react'
export const useInterval = (
callback: () => Promise<void>,
delay: number | null | false
) => {
const savedCallback = useRef<() => Promise<void>>()
useEffect(() => {
savedCallback.current = callback
@korrio
korrio / EscrowBNB.sol
Created April 29, 2023 08:18
EscrowBNB.sol
/**
*Submitted for verification at BscScan.com on 2022-11-08
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {