Skip to content

Instantly share code, notes, and snippets.

View pasevin's full-sized avatar
💭
I may be slow to respond.

Aleksandr Pasevin pasevin

💭
I may be slow to respond.
View GitHub Profile
@pasevin
pasevin / gist:3879901
Created October 12, 2012 15:51
Media Queries for Standard Devices | CSS - Tricks
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
@pasevin
pasevin / clean.sh
Last active November 24, 2019 12:40 — forked from Iman/clean.sh
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`sudo find /var/log -type f`
for i in $logs
This file has been truncated, but you can view the full file.
{
"id": "9e159e6992ade13b60ca3a72777f7879",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.4",
"solcLongVersion": "0.8.4+commit.c7e474f2",
"input": {
"language": "Solidity",
"sources": {
"contracts/Greeter.sol": {
"content": "//SPDX-License-Identifier: Unlicense\npragma solidity ^0.8.0;\n\nimport \"hardhat/console.sol\";\n\ncontract Greeter {\n string private greeting;\n\n constructor(string memory _greeting) {\n console.log(\"Deploying a Greeter with greeting:\", _greeting);\n greeting = _greeting;\n }\n\n function greet() public view returns (string memory) {\n return greeting;\n }\n\n function setGreeting(string memory _greeting) public {\n console.log(\"Changing greeting from '%s' to '%s'\", greeting, _greeting);\n greeting = _greeting;\n }\n}\n"
This file has been truncated, but you can view the full file.
{
"id": "9cdf73635a0f34b720701727efde623a",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.4",
"solcLongVersion": "0.8.4+commit.c7e474f2",
"input": {
"language": "Solidity",
"sources": {
"contracts/Greeter.sol": {
"content": "//SPDX-License-Identifier: Unlicense\npragma solidity ^0.8.0;\n\nimport \"hardhat/console.sol\";\n\ncontract Greeter {\n address myLibraryAddress;\n string private greeting;\n bool private testBool;\n uint256 private testUint;\n uint8 private testUint8;\n\n constructor(\n address _myLibraryAddress,\n string memory _greeting,\n bool _testBool,\n uint256 _testUint,\n uint8 _testUint8\n ) {\n console.log(\"Deploying a Greeter with greeting:\", _greeting);\n myLibraryAddress = address(_myLibraryAddress);\n greeting = _greeting;\n testBool = _testBool;\n testUint = _testUint;\n testUint8 = _testUint8;\n }\n\n function greet() public view returns (string memory) {\n return greeting;\n }\n\n function setGreeti
This file has been truncated, but you can view the full file.
{
"id": "569487d9d330123e48bbd19f3a1946a8",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.4",
"solcLongVersion": "0.8.4+commit.c7e474f2",
"input": {
"language": "Solidity",
"sources": {
"contracts/Greeter.sol": {
"content": "//SPDX-License-Identifier: Unlicense\npragma solidity ^0.8.0;\n\nimport \"hardhat/console.sol\";\n\nlibrary MyLibrary {\n function myFunction() external pure returns (uint256) {\n return 42;\n }\n}\n\ncontract Greeter {\n address myLibraryAddress;\n string private greeting;\n bool private testBool;\n uint256 private testUint;\n uint8 private testUint8;\n\n constructor(\n address _myLibraryAddress,\n string memory _greeting,\n bool _testBool,\n uint256 _testUint,\n uint8 _testUint8\n ) {\n console.log(\"Deploying a Greeter with greeting:\", _greeting);\n myLibraryAddress = address(_myLibraryAddress);\n greeting = _greeting;\n testBool = _testBool;\n testUint = _testUint;\n testUint8 = _testUint8;\n }\n\n
This file has been truncated, but you can view the full file.
{
"id": "b5afe1d4f024079d687bf9184b1ad401",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.4",
"solcLongVersion": "0.8.4+commit.c7e474f2",
"input": {
"language": "Solidity",
"sources": {
"contracts/Greeter.sol": {
"content": "//SPDX-License-Identifier: Unlicense\npragma solidity ^0.8.0;\n\nimport \"hardhat/console.sol\";\n\ncontract Greeter {\n address myLibraryAddress;\n string public greeting;\n bool public testBool;\n uint256 public testUint;\n uint8 public testUint8;\n struct TestStruct {\n uint256 testUint;\n uint8 testUint8;\n }\n TestStruct public testStruct;\n // nested\n struct TestStruct2 {\n TestStruct testStruct;\n uint256 testUint;\n }\n TestStruct2 public testStruct2;\n\n constructor(\n address _myLibraryAddress,\n string memory _greeting,\n bool _testBool,\n uint256 _testUint,\n uint8 _testUint8,\n TestStruct memory _testStruct,\n TestStruct2 memory _testStruct2\n ) payable {\n console.log(\"Deploying a Gre
@pasevin
pasevin / contracts...artifacts...InputTester.json
Created October 23, 2024 13:33
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.26+commit.8a97fa7a.js&optimize=false&runs=200&gist=
This file has been truncated, but you can view the full file.
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
@pasevin
pasevin / contracts...artifacts...build-info...2630c44b7716e737c9df9225c9ed5367.json
Created October 23, 2024 13:43
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.26+commit.8a97fa7a.js&optimize=false&runs=200&gist=
This file has been truncated, but you can view the full file.
{
"id": "2630c44b7716e737c9df9225c9ed5367",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.26",
"solcLongVersion": "0.8.26+commit.8a97fa7a",
"input": {
"language": "Solidity",
"sources": {
"contracts/InputTester.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ncontract InputTester {\n \n struct StructWithArray {\n string title;\n string[] tags;\n }\n\n struct NestedStruct {\n bool isToggled;\n string title;\n string author;\n uint book_id;\n address addr;\n string[] tags;\n TheStruct2 meta;\n }\n\n struct TheStruct2 {\n string subtitle;\n uint pages;\n }\n\n enum Status { Active, Inactive, Suspended }\n\n event Uint256Inputed(uint256 num);\n event AddressInputed(address addr);\n event StringInputed(string str);\n event BoolInputed(bool bl);\n event BytesInputed(bytes data);\n event EnumStatusInputed(Status status);\n event UnlimitedStri
@pasevin
pasevin / contracts...artifacts...build-info...381327ec55246b4a7859639e37859500.json
Created October 23, 2024 13:48
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.26+commit.8a97fa7a.js&optimize=false&runs=200&gist=
This file has been truncated, but you can view the full file.
{
"id": "381327ec55246b4a7859639e37859500",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.26",
"solcLongVersion": "0.8.26+commit.8a97fa7a",
"input": {
"language": "Solidity",
"sources": {
"contracts/MyUpgradeable.sol": {
"content": "// SPDX-License-Identifier: MIT\n// Compatible with OpenZeppelin Contracts ^5.0.0\npragma solidity ^0.8.20;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\ncontract MyUpgradeable is Initializable, OwnableUpgradeable, UUPSUpgradeable {\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor() {\n _disableInitializers();\n }\n\n function initialize(address initialOwner) initializer public {\n __Ownable_init(initialOwner);\n __UUPSUpgradeable_init();\n }\n\n function _authorizeUpgrade(address newImplementation)\n
@pasevin
pasevin / contracts...artifacts...MyUpgradeable.json
Created October 23, 2024 13:52
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.26+commit.8a97fa7a.js&optimize=false&runs=200&gist=
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},