Skip to content

Instantly share code, notes, and snippets.

View cyborgshead's full-sized avatar
🎯
#cyber

C H cyborgshead

🎯
#cyber
View GitHub Profile
@cyborgshead
cyborgshead / devChainConfigs.ts
Created November 10, 2024 08:41
celatone_config.ts
/* eslint-disable sonarjs/no-duplicate-string */
import type { ChainConfig } from "@alleslabs/shared";
export const devChainConfigs: ChainConfig[] = [
// Write your chain config here.
{
tier: "lite",
chainId: "bostrom",
chain: "bostrom",
registryChainName: "bostrom",
nodes:
- id: webcam
custom:
source: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/opencv_stream.py
outputs:
- image
- id: idefics2
operator:
python: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/idefics2_op.py
inputs:
@cyborgshead
cyborgshead / gist:a07e5be3a6658d8377945ae0a71e0ade
Created August 29, 2024 15:23
foam-presence-claim-decompiled-bytecode
# Palkeoramix decompiler.
def storage:
owner is addr at storage 0
stor1 is array of struct at storage 1
stor2 is array of struct at storage 2
ownerOf is mapping of struct at storage 3
balanceOf is mapping of uint256 at storage 4
approved is mapping of addr at storage 5
stor6 is mapping of uint8 at storage 6
@cyborgshead
cyborgshead / launch-ceremony.md
Created October 17, 2021 05:40
Launch Ceremony

Episode 1. A new hope.

....

cyberCongress command center. Cyberspace

mastercyb: Hello friend! The time has come. Are you ready?

cyberhead: Definitely ... It took us too long to get to this point. Do you remember how it all began?

@cyborgshead
cyborgshead / CTHelpers.sol
Created July 30, 2021 06:42 — 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/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) {
@cyborgshead
cyborgshead / cyber-task.md
Created March 10, 2021 08:12
Cyber Unicorn Task for HackAtom RU 2021

Task Name & Sponsor

Cyber Unicorn Task

Prize

35 GCYB (~4 ETH)

# of Winners

// ___________________________________________________
ch := make(chan int64, 100000)
var wg sync.WaitGroup
var lock1 sync.Mutex
var lock2 sync.Mutex
wg.Add(int(cidsCount))
// the worker's function
f := func(i int64) {
@cyborgshead
cyborgshead / aragon_bare_setup.md
Last active November 25, 2021 13:28
Aragon DAO bare setup

Prepare ~/.aragon/rinkeby_key.json

{
  "rpc": "https://<network>.infura.io",
  "keys": ["put-your-priv-key-here"]
}

Bootstrap

const {
Codec,
FieldOptions,
TypeFactory,
Utils,
Types,
WireTypes,
} = require('../index');
let StdTx = TypeFactory.create('StdTx', [{