Skip to content

Instantly share code, notes, and snippets.

@DeRauk
DeRauk / main_test.go
Created November 8, 2023 16:16
Reproduce failed context propagation for a temporal local activity in a test environment
package main
import (
"context"
"fmt"
"go.temporal.io/sdk/testsuite"
"go.temporal.io/sdk/workflow"
"testing"
)
@DeRauk
DeRauk / CTHelpers.sol
Last active January 31, 2022 19:51 — forked from cag/CTHelpers.sol
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.6.6+commit.6c089d02.js&optimize=false&gist=
pragma solidity ^0.6.0;
import { IERC20 } from "github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/token/ERC20/IERC20.sol";
library CTHelpers {
/// @dev Constructs a condition ID from an oracle, a question ID, and the outcome slot count for the question.
/// @param oracle The account assigned to report the result for the prepared condition.
/// @param questionId An identifier for the question to be answered by the oracle.
/// @param outcomeSlotCount The number of outcome slots which should be used for this condition. Must not exceed 256.
function getConditionId(address oracle, bytes32 questionId, uint outcomeSlotCount) internal pure returns (bytes32) {
cut -d: -f1 /etc/passwd # list users on system
sudo lsb_release -a # Get linux release
#include <iostream>
using namespace std;
int main()
{
char pattern;
int firstRow, lastRow, counter;
cout << "Enter the character you want to use for the pattern: ";