Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Andrew Plaza insipx

🏠
Working from home
View GitHub Profile
View configuration.nix
{ config, pkgs, ... }:
{
disabledModules = [
"hardware/video/nvidia.nix"
];
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
View block 6096514
id | block_num | hash | is_event | timestamp | duration | file | line | trace_id | trace_parent_id | target | name | traces
-------+-----------+--------------------------------------------------------------------+----------+----------------------------+----------+------------------------------------------------------------------------------------------------------------------+------+----------+-----------------+-----------------------------------+-----------------+----------------------------------------------------------------------------------
55751 | 6096514 | \xfc9dd9fd693485af56aea8b841399c5617c82c43b0dc5b7943fd1d915a8eb6fb | f | 2021-03-26 17:02:32.275115 | 1630 | /home/insipx/.cargo/git/che
View tracing_format
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing frame_executive: extract_pre_digest, time: 670, id: 2, parent_id: Some(1)
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing frame_executive: runtime_upgraded, time: 12890, id: 4, parent_id: Some(3)
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing sp_io::storage, parent_id: Some(3), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 255, 85, 59, 90, 152, 98, 165, 22, 147, 157, 130, 179, 211, 216, 102, 26]", value="[2]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing sp_io::storage, parent_id: Some(3), message="set", key="[58, 101, 120, 116, 114, 105, 110, 115, 105, 99, 95, 105, 110, 100, 101, 120]", value="[0, 0, 0, 0]"
2020-08-03 18:07:30.013 tokio-blocking-driver INFO sc_tracing sp_io::storage, parent_id: Some(3), message="set", key="[38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 2, 165, 193, 177, 154, 183, 160, 79, 83, 108, 81, 154, 202
View trx_minimal_example.rs
//! The table is :
//!
//! CREATE TABLE IF NOT EXISTS _background_tasks (
//! id BIGSERIAL PRIMARY KEY NOT NULL,
//! name VARCHAR NOT NULL,
//! )
//!
//!
//!
@insipx
insipx / meta_block_1768321.json
Created Apr 9, 2020
Full Metadata for block 1768321 on Kusama
View meta_block_1768321.json
[
1635018093,
{
"V11": {
"modules": [
{
"name": "System",
"storage": {
"prefix": "System",
"entries": [
View revert-all.sh
#!/bin/bash
diesel migration revert
diesel migration revert
diesel migration revert
diesel migration revert
diesel migration run
View main.rs
use subxt::{Client, ClientBuilder, system::System, balances::Balances};
use tokio::runtime::Runtime as TokioRuntime;
use futures::{Future, Stream};
use node_runtime::{Runtime as RuntimeT, SignedExtra};
use srml_system::Trait;
use balances::Trait as BalancesTrait;
fn main() {
let mut rt = TokioRuntime::new().unwrap();
let client = ClientBuilder::<Runtime>::new().set_url(url::Url::parse("ws://127.0.0.1:9944").unwrap()).build();
@insipx
insipx / main.rs
Created May 10, 2019
Image Reading/Writing
View main.rs
use std::io::{Read, Write};
use std::fs::File;
fn main() {
let mut image = File::open("./image.jpg").unwrap();
let mut buffer = Vec::new();
let bytes = image.read_to_end(&mut buffer);
let mut out = File::open("./output.jpg").unwrap();
out.write(buffer.as_slice()).unwrap();
View keybase.md

Keybase proof

I hereby claim:

  • I am insipx on github.
  • I am insi (https://keybase.io/insi) on keybase.
  • I have a public key whose fingerprint is 56E2 B165 E9F4 EFF4 4EBB 5034 D598 5E06 B8CF DFE6

To claim this, I am signing this object:

@insipx
insipx / index.html
Created Jun 10, 2018
Space Invaders HTML5 Canvas
View index.html
<link href='https://fonts.googleapis.com/css?family=Play:400,700' rel='stylesheet' type='text/css'>
<canvas id="game-canvas" width="640" height="640"></canvas>