Skip to content

Instantly share code, notes, and snippets.

@phinett
phinett / [email protected]
Created October 18, 2022 13:27
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.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../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
@phinett
phinett / [email protected]
Created October 18, 2022 13:21
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.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../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
@phinett
phinett / [email protected]
Created October 18, 2022 13:20
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.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../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
// SPDX-License-Identifier: MIT
//.
pragma solidity ^0.8.10;
// Import the IERC20 interface and and SafeMath library
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
0:000> !analyze -v -hang
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************
*************************************************************************
*** ***
*** ***
0:247> ~*e !clrstack
OS Thread Id: 0xae14 (0)
Unable to walk the managed stack. The current thread is likely not a
managed thread. You can run !threads to get a list of managed threads in
the process
Failed to start stack walk: 80070057
OS Thread Id: 0x22a4 (1)
Unable to walk the managed stack. The current thread is likely not a
managed thread. You can run !threads to get a list of managed threads in
the process
This file has been truncated, but you can view the full file.
time,logger,level,database,message,exception
2015-01-28 23:24:24.4862,Raven.Database.DocumentDatabase,Debug,<system>,Start loading the following database: <system>,
2015-01-28 23:24:25.6718,Raven.Database.Impl.DocumentCacher,Info,<system>,"MemoryCache Settings:
PhysicalMemoryLimit = 99
CacheMemoryLimit = 3206545408
PollingInterval = 00:02:00",
2015-01-28 23:24:25.7342,Raven.Database.Storage.Esent.StorageConfigurator,Info,<system>,"Esent Settings:
MaxVerPages = 16384
CacheSizeMax = 262144
DatabasePageSize = 4096",
@phinett
phinett / gist:a39ecdd213874f0bc78c
Created September 4, 2014 15:24
RavenDb.Test.SpatialAndProjectionAndTransform
public class TransformResultsWithProjection : RavenTestBase
{
public class BaseInvoice
{
public BaseInvoice()
{
Calls = new List<ServiceCall>();
}
public string Id { get; set; }
public class SpatialResultsTest : RavenTestBase
{
private class Lead
{
public string Id { get; set; }
public double Lat { get; set; }
public double Lng { get; set; }
}
private class LeadsIndex : AbstractIndexCreationTask<Lead, LeadsIndex.Result>
@phinett
phinett / replicationerror.log
Created July 30, 2014 15:08
ravendb log file
2014-07-30 16:06:37.1202,Raven.Database.Indexing.WorkContext,Debug,,Incremented work counter to 76257 because: WORK BY IndexingExecuter,
2014-07-30 16:06:37.1202,Raven.Database.Storage.Voron.StorageActions.DocumentsStorageActions,Debug,housemixes,Document with key='Raven/Replication/Destinations' was not found,
2014-07-30 16:06:37.1202,Raven.Database.Storage.Voron.StorageActions.DocumentsStorageActions,Debug,housemixes,Document with key='Raven/Replication/Destinations' was not found,
2014-07-30 16:06:37.1202,Raven.Database.Indexing.WorkContext,Debug,housemixes,"No work was found, workerWorkCounter: 76257, for: ReplicationTask, will wait for additional work",
2014-07-30 16:06:37.1202,Raven.Database.Server.WebApi.RequestManager,Debug,housemixes,"Request #516,118: POST - 3,371 ms - housemixes - 500 - http://46.28.51.84:9090/databases/housemixes/replication/replicateDocs?from=http:%2F%2Fmp443887:8081%2Fdatabases%2Fhousemixes&dbid=91e12dde-b14c-41e2-819b-3486932e42f1",
2014-07-30 16:06:37.1202,Raven.Database.In