Search in all files at a specific revision
git grep $PATTERN $REVISION
Find commits where the diff matches
git log -S $PATTERN
| #!/bin/bash | |
| # justfile-shellcheck.sh - Extract and lint bash code from justfile recipes | |
| # Set DEFAULT_OPTIONS to your liking | |
| set -euo pipefail | |
| JUSTFILE="${1:-justfile}" | |
| TEMP_DIR=$(mktemp -d) | |
| SHELL_TYPE="${2:-bash}" # Default to bash, can be overridden |
| import { createPublicClient, createWalletClient, http, defineChain } from 'viem' | |
| import { celoAlfajores } from 'viem/chains' | |
| import { privateKeyToAccount } from 'viem/accounts' | |
| const devChain = defineChain({ | |
| ...celoAlfajores, | |
| id: 1337, | |
| name: 'local dev chain', | |
| network: 'dev', | |
| rpcUrls: { |
| import sqlite3 | |
| conn = sqlite3.connect(":memory:") | |
| conn.row_factory = sqlite3.Row | |
| def print_query_plan(query, bindings={}): | |
| depth_of = {0: -1} | |
| result = conn.execute("EXPLAIN QUERY PLAN " + query, bindings).fetchall() | |
| for r in result: | |
| depth = depth_of[r['parent']] + 1 |
| #defaultView:ImageGrid | |
| SELECT DISTINCT * | |
| WHERE { | |
| SERVICE wikibase:mwapi { | |
| bd:serviceParam wikibase:api "EntitySearch" . | |
| bd:serviceParam wikibase:endpoint "www.wikidata.org" . | |
| bd:serviceParam mwapi:search ?company_name . | |
| bd:serviceParam mwapi:language "en" . | |
| ?comp wikibase:apiOutputItem mwapi:item . | |
| ?num wikibase:apiOrdinal true . |
| import eth_keyfile | |
| from web3 import Account, Web3 | |
| from web3.middleware import geth_poa_middleware | |
| w3 = Web3(Web3.HTTPProvider("http://geth.goerli.ethnodes.brainbot.com:8545")) | |
| w3.middleware_onion.inject(geth_poa_middleware, layer=0) | |
| addr = "8f5ea3bb3e99c317b8745918f6973f7afbf659c3" | |
| first_stuck = 226164 | |
| stuck_nonces = range(first_stuck, first_stuck + 20) | |
| gas_price = w3.toWei(10, "gwei") |
| #!/usr/bin/env python3 | |
| from typing import List, Union, Callable | |
| from lxml import etree as ET | |
| from io import BytesIO | |
| tei = '{http://www.tei-c.org/ns/1.0}' | |
| ns = { | |
| None: 'http://www.tei-c.org/ns/1.0', | |
| } |
| SELECT | |
| table_name, | |
| pg_size_pretty(table_size) AS table_size, | |
| pg_size_pretty(indexes_size) AS indexes_size, | |
| pg_size_pretty(total_size) AS total_size, | |
| round(total_size / sum(total_size) OVER () * 100, 2) AS percent | |
| FROM ( | |
| SELECT | |
| table_name, | |
| pg_table_size(table_name) AS table_size, |