Skip to content

Instantly share code, notes, and snippets.

View odion-cloud's full-sized avatar
🏠
Working from home

ODION IGIOGBE KELLY odion-cloud

🏠
Working from home
View GitHub Profile
@odion-cloud
odion-cloud / .deps...npm...@openzeppelin...contracts...access...Ownable.sol
Created September 25, 2025 10:08
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.20+commit.a1b79de6.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
@odion-cloud
odion-cloud / .deps...npm...@openzeppelin...contracts...access...Ownable.sol
Created September 25, 2025 10:07
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.20+commit.a1b79de6.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
@odion-cloud
odion-cloud / .deps...npm...@openzeppelin...contracts...access...Ownable.sol
Created September 25, 2025 09:31
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.30+commit.73712a01.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
/**
* Export all data from an IndexedDB database
*
* @param {IDBDatabase} idbDatabase The database to export from
* @return {Promise<string>}
*/
export function exportToJson(idbDatabase) {
return new Promise((resolve, reject) => {
const exportObject = {}
if (idbDatabase.objectStoreNames.length === 0) {
@odion-cloud
odion-cloud / TelegramDocumentProxy.js
Created October 10, 2024 23:35 — forked from witnessmenow/TelegramDocumentProxy.js
Example of a getting a file from Telegram without exposing your Bot Token using nodeJS and express. TelegramClient.getFileDetails is a call to the Telegram getFile api. The file is then requested and the response is pipped into response sent back to the user
router.get('/:documentId/*', (req, res) => {
var documentId = req.params.documentId;
if(documentId){
TelegramClient.getFileDetails(documentId).then((fileDetails) => {
var fileUrl = TelegramClient.getTelegramFileUrl(fileDetails.result.file_path);
request(fileUrl)
.on('response', (response) => {
if (response.statusCode === 200) {
res.writeHead(200, {
'Content-Type': response.headers['content-type']
@echo off
set /p domain="Enter Domain: "
set OPENSSL_CONF=../conf/openssl.cnf
if not exist .\%domain% mkdir .\%domain%
..\bin\openssl req -config cert.conf -new -sha256 -newkey rsa:2048 -nodes -keyout %domain%\server.key -x509 -days 3650 -out %domain%\server.crt
echo.
echo -----
[ req ]
default_bits = 2048
default_keyfile = server-key.pem
distinguished_name = subject
req_extensions = req_ext
x509_extensions = x509_ext
string_mask = utf8only
[ subject ]
@odion-cloud
odion-cloud / repaire-mysqli.md
Last active September 22, 2021 20:21
Repaire mysqli data (localhost)

STOP! Please do NOT delete ibdata1 file!

Deleting this file is like playing a Russian roulette with your databases, it could work and restablish everything, but also, probably could leave unusable every database you have.

Instead, first try using the MySQL backup folder which is included with XAMPP. So do the next:

  1. Rename the folder mysql/data to mysql/data_old (you can use any name)
  2. Create a new folder mysql/data
  3. Copy the content that resides in mysql/backup to the new mysql/data folder
  4. Copy all your database folders that are in mysql/data_old to mysql/data (skipping the mysql, performance_schema, and phpmyadmin folders from data_old)