Skip to content

Instantly share code, notes, and snippets.

View snipsnipsnip's full-sized avatar

Satoshi Kodama snipsnipsnip

View GitHub Profile

*Locating Specific Docs*

I've successfully found the documentation for light_ranged_integers version 0.1.3. The new function is of particular interest, as it returns a Result. I'm now reviewing the possible error types defined within RangedIntError.

*Resolving Result Import*

I've pinpointed the issue: the compiler can't find unwrap because the Result type isn't std::result::Result. It's a custom type defined by the crate. My next step is to import the custom Result type, anticipating that this will fix the problem. I am now trying to use unwrap() once again.

*Considering the Failures*

I'm facing a complete meltdown. My Rust code attempts have been abysmal, a string of failures. The immediate next step involves a comprehensive error summary before admitting defeat. The initial hurdle: a frustrating unresolved import error.

*Accepting Defeat*

\n\n

{
"address": "0x9b2aaaf663839d09907bff786f9796c582c2fb9b",
"msg": "Hi, I'm https://github.com/snipsnipsnip/",
"sig": "0x8ad0bbb248ad8d33f1025245e2bad57030156337dd426ae003a9209efc54af4f06f29318f7c201c83e3fd57793376089bfd006c4b51deaed55b663ad5ccbe46f1c",
"version": "2"
}
@snipsnipsnip
snipsnipsnip / chrome-i18n.js
Last active January 11, 2020 11:37 — forked from eligrey/chrome-i18n.js
Easy i18n for your Chrome extensions and apps' DOM.
/*
* A cut-down i18n utility. @snipsnipsnip
* Based on Chrome DOM i18n By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
"use strict";
for (let e of document.querySelectorAll("[data-i18n]")) {
@snipsnipsnip
snipsnipsnip / kill-steamvr.bat
Created August 6, 2019 03:26
kill-steamvr.bat
@taskkill /f /im vr*
@snipsnipsnip
snipsnipsnip / autozip.rb
Created June 9, 2019 13:16
autozip.rb is a 7za wrapper extracts/archives any zips/folders (respectively) put in the working directory
# frozen-string-literal: true
require 'fileutils'
require 'shellwords'
require 'date'
Outdir = 'out'
def run(cmd)
puts "!#{cmd}"
system cmd
@snipsnipsnip
snipsnipsnip / trac-update-field.py
Last active April 20, 2019 09:19
trac-update-field.py writes a single field with xmlrpc
from __future__ import annotations
from xmlrpc.client import Transport, ServerProxy
import sys
import typing
if typing.TYPE_CHECKING:
import http.client
from typing import Dict, List, Tuple, Optional
@snipsnipsnip
snipsnipsnip / perm.rb
Last active September 4, 2019 11:20
perm.rb: explodes ARGV as a TSV (permutate 'foo bar baz' 'quu qux' yields 6 lines)
# frozen_string_literal: true
# permutate.rb: MIT license. @snipsnipsnip
require 'csv'
require 'optparse'
require 'shellwords'
def main(argv=ARGV)
filter = nil
rest = nil
need_header = false
@snipsnipsnip
snipsnipsnip / SomeMFCControl.cs
Last active May 19, 2018 10:51
MFCの部品をWindows.Forms.Formに埋め込む ref: https://qiita.com/snipsnipsnip/items/19045907ae96121e8310
public class GuestControl : Control
{
/// <summary>アタッチしたMFCのCWnd</summary>
private IntPtr CWnd { get; }
[DllImport("attach")]
private static extern IntPtr attach(IntPtr hwnd);
[DllImport("attach")]
private static extern void detach(IntPtr hwnd);
@snipsnipsnip
snipsnipsnip / file5.txt
Last active May 14, 2020 10:34
git rebase --interactive でコミットの見分けがつかない問題の対策 ref: https://qiita.com/snipsnipsnip/items/8e4244b4fff2a5a2bc32
$ git reset --hard E # git reset --hard origin/devel でも可
$ git cherry-pick -n D A
$ git commit -m "DとA"
$ git cherry-pick B
$ git cherry-pick C
@snipsnipsnip
snipsnipsnip / file0.txt
Created December 14, 2017 14:50
「クラスを抽出」というリファクタリングがあるとしたらどういうものだろうか ref: https://qiita.com/snipsnipsnip/items/3a8d018d683d2c54ea15
interface R {
$(D1)
$(V1)
}