https://www.reddit.com/r/youtubedl/comments/10ar7o7/if_youve_been_using_the_get_cookiestxt_chrome/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # This is a script for renewing Cloudflare Origin Certificate in AWS Lightsail Wordpress. | |
| # Thank Digicert for making [Easy CSR](https://www.digicert.com/easy-csr/openssl.htm). | |
| # | |
| # Please put this file to `/opt/bitnami/letsencrypt/certificates/` folder, | |
| # and register cron like this: | |
| # ```bash | |
| # 0 15 * * * sudo sh /opt/bitnami/letsencrypt/certificates/renew-cert.sh | |
| # ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function getList(prev, query) { | |
| return selectList(); | |
| } | |
| export default async function Page() { | |
| const [list, formAction, isPending] = useActionState(getList, []); | |
| return ( | |
| <form> | |
| <List list={list} /> | |
| <button type="button" disable={isPending} onClick={formAction}>refresh</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::{iter, slice, vec}; | |
| use std::iter::FromIterator; | |
| /// A unique identifier with an associated usize index. Indexes are valued proportional to the | |
| /// number of indexes allocated, are reused after being freed, and do not grow without bound. When | |
| /// an index is re-used, an associated "generation" is incremented, so that within the life of a | |
| /// single allocator, no two GenerationalIndex values will ever be equal. Since the indexes do not | |
| /// grow without bound, GenerationalIndex values are particularly suited to being stored by their | |
| /// index in extremely fast contiguous arrays. | |
| #[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Debug)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { ethers } = require("hardhat"); | |
| // json -> solidity struct | |
| function encodeData(str) { | |
| const {users, ranks} = JSON.parse(str) | |
| return [users, ranks.map(({name, count}) => [name, count, []])] | |
| } | |
| // solidity struct -> json | |
| function decodeData(enc) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity ^0.8.4; | |
| contract Gashapon { | |
| // struct of rank. count is a maximum size of winners array. winners array stores users from user lists | |
| struct Rank { | |
| string name; | |
| uint count; | |
| string[] winners; |


