Skip to content

Instantly share code, notes, and snippets.

View genecyber's full-sized avatar
🎯
Focusing

Shannon Code genecyber

🎯
Focusing
View GitHub Profile
@genecyber
genecyber / Patent.md
Last active February 26, 2024 03:20
Cheevly - Solar Cell Patent

Title: Enhanced Photovoltaic Properties and Stability of Tin-Based Perovskite Solar Cells through Heat Treatment and MgF2 Layer Application

Abstract:

The present invention discloses a method for producing tin-based perovskite solar cells with enhanced photovoltaic properties and stability. The method involves providing a tin-based perovskite structured compound, applying a protective MgF2 layer to the compound, and diffusing phosphorus or boron into the compound through heat treatment. The resulting solar cells exhibit improved performance and stability attributed to the MgF2 layer and the diffusion of phosphorus or boron.

Field of the Invention:

The present invention pertains to the field of solar cells, particularly focusing on tin-based perovskite solar cells with enhanced photovoltaic properties and stability.

Background of the Invention:

Perovskite solar cells offer high power conversion efficiency but face challenges regarding stability under environmental conditions. This invention addres

@genecyber
genecyber / yt-audioClip.py
Created January 26, 2024 02:44
Youtube mp3 audio extractor : ./yt-audioClip.py "http://youtube?something" "00:15" "03:00" "extracted.mp3"
#!/bin/bash
youtube_url_or_local_file="https://www.youtube.com/watch?v=nDe8D6h9Vkk"
start_time_m="00:29"
end_time_m="00:32"
output_file_mp3="Italian.mp3"
# Check if 4 arguments are passed (YouTube URL or local file, start time, end time, output file)
if [ "$#" -eq 4 ]; then
# Assign arguments to variables if passed
youtube_url_or_local_file=$1

Nft automations

Self held staking

  • wildcard mint
  • wildcard transfer Catcher
  • on mint registers deposit address
  • on transfer — check if _to is registered deposit address — distribute stake
pragma solidity 0.8.4;
import "@openzeppelin/contracts-upgradeable/proxy/ClonesUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./ERC165.sol";
interface IERC721 {
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(address from, address to, uint256 tokenId) external;
@genecyber
genecyber / ConfirurableERC20.sol
Last active February 6, 2022 06:48
Configurable ERC20 Solidity Contract
/*
_____ __ _ _ _
/ ____| / _(_) | | | |
| | ___ _ __ | |_ _ __ _ _ _ _ __ __ _| |__ | | ___
| | / _ \| '_ \| _| |/ _` | | | | '__/ _` | '_ \| |/ _ \
| |___| (_) | | | | | | | (_| | |_| | | | (_| | |_) | | __/
\_____\___/|_| |_|_| |_|\__, |\__,_|_| \__,_|_.__/|_|\___|
__/ |
______ _____ _____ ___|___/_
| ____| __ \ / ____|__ \ / _ \
@genecyber
genecyber / Swap.sol
Last active January 25, 2021 03:25
Simple NFT Order for Eth Contract Example
pragma solidity ^0.6.11;
pragma experimental ABIEncoderV2;
interface IERC721 {
function burn(uint256 tokenId) external;
function transferFrom(address from, address to, uint256 tokenId) external;
function mint( address _to, uint256 _tokenId, string calldata _uri, string calldata _payload) external;
function ownerOf(uint256 _tokenId) external returns (address _owner);
function getApproved(uint256 _tokenId) external returns (address);
function safeTransferFrom(address _from, address _to, uint256 _tokenId) external;
@genecyber
genecyber / cardType.js
Created March 8, 2017 01:40
Javascript to determine credit card type
function GetCardType(number)
{
// visa
var re = new RegExp("^4");
if (number.match(re) != null)
return "Visa";
// Mastercard
re = new RegExp("^5[1-5]");
@genecyber
genecyber / EtherRouter.sol
Created December 15, 2020 17:27
Upgradable NFT Trading contract Set
pragma solidity ^0.4.8;
import "./Resolver.sol";
contract EtherRouter {
Resolver resolver;
function EtherRouter(Resolver _resolver) {
resolver = _resolver;
}
/**
*Submitted for verification at Etherscan.io on 2020-07-30
*/
pragma solidity 0.6.0;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");