Skip to content

Instantly share code, notes, and snippets.

Currently we are using these queries to search extrinsics and events by name

query MyQuery {
  extrinsics(where: {call: {name_eq: "Balances.transfer"}}, limit: 10, orderBy: id_DESC) {
    id
  }
  events(where: {name_eq: "Balances.transfer"}, limit: 10, orderBy: id_DESC) {
    id
 }
@uiii
uiii / account.md
Last active October 12, 2022 09:25

This query (account search) run agains https://kusama.explorer.subsquid.io/graphql

query MyQuery {
  extrinsics(
    where: {
      OR: [
        {
          signature_jsonContains: "{\"address\": \"0x565d3c8cd1fcc93ed837d3f9830e333659cd0962ae7fadb7c87899d0b1431822\" }"
        },
docker volume create --name <new_volume>
docker run --rm -it -v <old_volume>:/from -v <new_volume>:/to alpine ash -c "cd /from ; cp -av . /to"
docker volume rm <old_volume>
docker system prune -a -f
net stop com.docker.service
taskkill /F /IM "Docker Desktop.exe"
stop-vm DockerDesktopVM
Optimize-VHD -Path "C:\Users\Public\Documents\Hyper-V\Virtual hard disks\DockerDesktop.vhdx" -Mode Full
start-vm DockerDesktopVM
start "C:\Program Files\Docker\Docker\Docker Desktop.exe"
net start com.docker.service
done :D
@uiii
uiii / install-cli.php
Created March 30, 2015 19:33
ProcessWire 2.5 CLI installer
<?php
/**
* ProcessWire Installer
*
* Because this installer runs before PW2 is installed, it is largely self contained.
* It's a quick-n-simple single purpose script that's designed to run once, and it should be deleted after installation.
* This file self-executes using code found at the bottom of the file, under the Installer class.
*
* Note that it creates this file once installation is completed: /site/assets/installed.php
<?php
use Nette\Application\IRouter;
use Nette\Application\UI\InvalidLinkException;
use Nette\Application\UI\Presenter;
use Nette\Application;
use Nette\Http\Request;
use Nette\Http\Url;
use Nette\Object;
@uiii
uiii / searchfile
Created September 9, 2013 19:00
Search out all files in the current directory and subdirectories containing the given text and prints the lines with highlighted occurrences.
#!/bin/bash
function processFile {
if [[ "$1" == *-i* ]]
then
sedOptions='I' # case-insensitive
fi
grep -IHEn $1 "$2" $3 | sed -e "s/\($2\)/\x1b[0;33m\1\x1b[0m/${sedOptions}g" | cut -c -500
}