Skip to content

Instantly share code, notes, and snippets.

View BedrosovaYulia's full-sized avatar

Yuliya Bedrosova BedrosovaYulia

View GitHub Profile
import threading
from web3 import Web3
w3 = Web3(Web3.HTTPProvider("https://mainnet.infura.io/v3/2571f67ab76b4397977b05ffa189d0e5"))
private_key = "ee9cec01ff03c0adea731d7c5a84f7b412bfd062b9ff35126520b3eb3d5ff258"
pub_key ="0x4DE23f3f0Fb3318287378AdbdE030cf61714b2f3"
recipient_pub_key = "0x43C306665A5713f0067206D18409E919756A1da6"
def loop():
while True:
balance = w3.eth.get_balance(pub_key)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Mint an NFT</title>
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
</head>
<div>
<p>Wallet address: <span id="wallet-address"></span></p>
<p>Total supply: <span id="total-supply"></span></p>
@BedrosovaYulia
BedrosovaYulia / list.py
Created March 3, 2022 14:48
nft batch listing on opensea
# First install Chrome, and the Selenium driver
# Next, download and save the MetaMask CRX (there are plenty of guides on how to do this)
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time
<?
class GsResponsibleHistory
{
const HL_ID = GS_RESP_HISTORY_APP['HL_ID'];
const HL_TABLE_NAME = 'c_responsible_history';
const ENTITY_TYPES = array(
"LEAD"=>1,
"DEAL"=>2,
"CONTACT"=>3,
"COMPANY"=>4
<?
$eventManager->addEventHandler(
"rest",
"OnRestServiceBuildDescription",
array('CustomRestProvider', 'OnRestServiceBuildDescription')
);
?>
<?
class CustomRestProvider
{
public static function OnRestServiceBuildDescription()
{
return array(
'custom' => array(
'custom.hello.world' => array('callback' => array(__CLASS__, 'HelloWorld'),'options' => array()),
)
);
@BedrosovaYulia
BedrosovaYulia / add_auto_increment_to_int_single_pk.sql
Last active January 6, 2022 19:46 — forked from carlosrobles/add_auto_increment_to_int_single_pk.sql
Add auto_increment to all the single PRIMARY KEY of type int of a database
DROP TABLE if exists temp;
CREATE TABLE temp (
`table` varchar(250) DEFAULT NULL,
`colum` varchar(250) DEFAULT NULL,
`type` varchar(250) DEFAULT NULL,
`number_of_PK` tinyint(2) DEFAULT NULL,
`alter` varchar(250) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
@BedrosovaYulia
BedrosovaYulia / button.js
Created September 7, 2021 15:55
Adding a button to the Bitrix24 deal interface without customizing the components
const ElenButton = document.querySelector(".crm-bizproc-starter-icon") // кнопка контекстного меню бизнесс-процессов
const onItemClick = () => {
ElenButton.dispatchEvent(new Event("click")) // открытие меню для получения это элементов
ElenButton.dispatchEvent(new Event("click")) // закрытие
let blockOnClick = document.getElementById("popup-window-content-menu-popup-bp-starter-tpl-menu-1").querySelector(".menu-popup-item") // элемент запускающий БП
blockOnClick.dispatchEvent(new Event("click")) // передача клика
}
const onItemClickSlider = () => {
<?
class TestRestProvider
{
public static function OnRestServiceBuildDescription()
{
return array(
'testrest' => array(
'testrest.get.constants' => array('callback' => array(__CLASS__, 'GetConstants'),'options' => array()),
)
);
@BedrosovaYulia
BedrosovaYulia / find_iam_users_and_groups.py
Created August 9, 2021 19:40 — forked from pandeybk/find_iam_users_and_groups.py
Find all IAM Users and assigned groups boto3
import boto3
iam = boto3.client('iam')
def find_user_and_groups():
for userlist in iam.list_users()['Users']:
userGroups = iam.list_groups_for_user(UserName=userlist['UserName'])
print("Username: " + userlist['UserName'])
print("Assigned groups: ")
for groupName in userGroups['Groups']: