Skip to content

Instantly share code, notes, and snippets.

@myazakky
myazakky / wangsAlgorithm.v
Created January 29, 2022 22:41
Wang's algorithm in Coq.
Require Import List.
Require Import Datatypes.
Require Export Coq.Strings.String.
Require Export Coq.Lists.List.
Inductive CL: Type :=
| var (a: string)
| CLNot (a: CL)
| CLAnd (a1 a2: CL)
| CLOr (a1 a2: CL)
| CLImp (a1 a2: CL).
@myazakky
myazakky / page.py
Created January 9, 2022 12:22
scrapbox ->slack
import urllib.request
import json
class Page:
def __init__(self, data):
self.id = data["id"]
self.title = data["title"]
self.descriptions = data["descriptions"]
self.project = data["project"]
self.url = data["url"]
@myazakky
myazakky / buttobi.cpp
Created December 27, 2021 11:57
ぶっ飛び時計
#include <M5Stack.h>
#include <WiFi.h>
#include <HTTPClient.h>
#include "time.h"
#include <ArduinoJson.h>
WiFiClient client;
const char* ssid = "";
@myazakky
myazakky / install_nim.sh
Last active October 8, 2021 18:54
nim-installer
#!/bin/sh
# Usage:
# curl -L https://gist.github.com/myazakky/a3627f760f9a772f89c7ea9de6a8be45/raw > /tmp/install_nim.sh; sudo sh /tmp/install_nim.sh
apt install \
wget \
unar \
gcc \
@myazakky
myazakky / wasabi.ino
Last active September 10, 2021 00:04
wasabi.ino
#include <M5Stack.h>
#include <WiFi.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include "Ambient.h"
#define ONE_WIRE_BUS 22
#define FAN 5
#define OUT1 21
import net, os, random
const lain_ascii_art = """
_..--¯¯¯¯--.._
,-'' `-.
,' `.
, \
/ \
/ ′. \
' / ││ ;
@myazakky
myazakky / setup_gsngw_nonat.sh
Last active August 7, 2021 07:34
GSNet tinc接続用セットアップスクリプト(hotate)
#!/bin/sh
#
# 使い方:
# curl -L https://gist.githubusercontent.com/myazakky/66f8c2585d6f4639ab28d6cff7762e9a/raw > /tmp/setup_tinc.sh; sudo sh /tmp/setup_tinc.sh <ノード名> <IPアドレス>
#
if test -d /etc/tinc/gsnet; then
printf 'エラー: /etc/tinc/gsnet は既に存在します\n'
printf 'セットアップを中止します\n'
exit 1