Skip to content

Instantly share code, notes, and snippets.

View karno's full-sized avatar
🤔

Karno karno

🤔
View GitHub Profile
@karno
karno / gist:4362071
Last active January 7, 2024 07:45 — forked from shobotch/gist:4361982
取得可能なIDから数字を含まないものだけ抽出。
afmd
afnj
afqb
afqg
afqj
afqw
afqx
afqz
afvq
afwh
11 12 13 14
21 22 23 24
31 32 33 34
a b c d
11 12 13 14
21 22 23 24
31 32 33 34
use super::config;
use config::*;
use futures::future::TryFutureExt;
use std::iter::Iterator;
use std::path;
pub static DEFAULT_ID: u64 = 0;
pub async fn load_or_init_api_key(token_file: &str) -> Result<ApiKey, ConfigError> {
let token_path = path::Path::new(token_file);
pub async fn load_or_init_api_key(token_file: &str) -> Result<ApiKey, ConfigError> {
let token_path = path::Path::new(token_file);
if token_path.exists() {
let token = ApiKey::load(token_path)?;
match ApiKey::load(token_path) {
Ok(token) => Ok(token),
Err(e) => {
eprintln!("failed to read application token file:");
eprintln!("{}", e);
Err(e)
pub async fn load_or_init_api_key(token_file: &str) -> Result<ApiKey, ConfigError> {
let token_path = path::Path::new(token_file);
if token_path.exists() {
let token = ApiKey::load(token_path)?;
match ApiKey::load(token_path) {
Ok(token) => Ok(token),
Err(e) => {
eprintln!("failed to read application token file:");
eprintln!("{}", e);
Err(e)
@karno
karno / haru_stations.py
Last active February 2, 2020 03:42
はるアイコン鯖の駅コード候補
stationIdTable = {
# 交通結節主要駅(または、将来的に大規模になりそうなことが想定される駅)
"AA": "はる空港",
"CC": "長府",
"EE": "EFB城",
"HH": "はるアイコン鯖役場",
"JJ": "城南",
"MM": "メガネケエスタワー",
"SS": "下関",
"TT": "津港",
@karno
karno / Athenaeum.Injection.Kana.cs
Created April 1, 2011 10:18
Phonetics resolver
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using Microsoft.VisualBasic;
using Std.Tweak;
@karno
karno / SushiSlot.tsx
Created October 16, 2019 16:36
sushiro gacha test
import React, { useState, useEffect } from 'react';
import SushiInfo from './common/SushiInfo';
import './SushiSlot.css';
interface SushiSingleSlotProps {
sushies: SushiInfo[],
sushi: SushiInfo,
delay: number,
}
@karno
karno / file0.txt
Created July 26, 2019 08:30
GitHubへのgit clone/pull/push時にSSL証明書まわりでエラーが出るときの本当に正しい対処法 ref: https://qiita.com/karno/items/5ad5006a4912617d2610
$ git clone https://github.com/karno/Cadena
Cloning into 'Cadena'...
fatal: unable to access 'https://github.com/karno/Cadena/': SSL certificate problem: self signed certificate in certificate chain
exit status 128