Skip to content

Instantly share code, notes, and snippets.

@dev001hajipro
dev001hajipro / install.txt
Last active Sep 3, 2020
Windows10でUnity2020.1.4f1にAndroid10.0(Android SDK Platform 29)をインストールする方法
View install.txt
Unity2020.1.4f1でビルドしたら、Google Play Consoleでエラーが出たので調べました。
管理者権限でcmdコマンドプロンプト起動して以下のコマンドを入れていく。
set java_home="C:\Program Files\Unity\Hub\Editor\2020.1.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK"
set android_home="C:\Program Files\Unity\Hub\Editor\2020.1.4f1\Editor\Data\PlaybackEngines\AndroidPlayer"
cd "C:\Program Files\Unity\Hub\Editor\2020.1.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\bin"
sdkmanager.bat --update
sdkmanager "platform-tools" "platforms;android-29"
@dev001hajipro
dev001hajipro / PIC16F628A_led_blink.c
Created May 16, 2020
MCLREをONにしているので、リセット回路を追加する必要がある。
View PIC16F628A_led_blink.c
View attiny13a_led_switch.c
/*
* GccApplication1.c
*
* Created: 2020/04/24 19:51:08
* Author : dev001hajipro
8-PDIP
PB5 1| tiny13 8|VCC
A3 PB3 2| |PB2 (SCK A1
A2 PB4 3| |PB1 (MISO
View arithmetic_progression.py
# a initial term
# d common_difference
def arithmetic_progression(a = 0, d = 0, n = 1):
print(a + (d * (n-1)))
return a + (d * (n-1))
def main():
nnn = [arithmetic_progression(5, 2, i) for i in range(1,10)]
print(nnn)
@dev001hajipro
dev001hajipro / Mux8Way16.hdl
Created Dec 23, 2018
nand2tetris Mux8Way16.hdl
View Mux8Way16.hdl
// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/01/Mux8Way16.hdl
/**
* 8-way 16-bit multiplexor:
* out = a if sel == 000
* b if sel == 001
* etc.
View p5.js_snakegame.js
// https://www.youtube.com/watch?v=AaGK-fj-BAM
const scale = 20;
class Snake {
constructor() {
this.x = 0;
this.y = 0;
this.xspeed = 1;
this.yspeed = 0;
this.total = 0;
this.tail = [];
@dev001hajipro
dev001hajipro / Windows10_Racket_Install_tips_MEMO.md
Last active Oct 18, 2018
Windows10_Racket_Install_tips (tls1.2 support)
View Windows10_Racket_Install_tips_MEMO.md

racketのビルド

Tutorial: Contributing to Racket には、 main-distributionのビルド方法も書かれています。DrRacketIDEなどをビルドする時の参考になります。

環境

  • Windows10 64bit
  • Build Tools for Visual Studio

この例ではC:\workspace_racketで作業します。

View app.js
const rnd = (n = 4) => Math.floor(Math.random() * n)
class GameScene extends Phaser.Scene {
constructor() {
super({ key: 'gameScene' });
this.rows = 4;
this.cols = 4;
this.grid = new Array(4);
for (let r = 0; r < this.rows; r++) {
this.grid[r] = new Array(4);
@dev001hajipro
dev001hajipro / Makefile
Created Aug 5, 2018
複数ターゲットに対応したNASM32bitのMakefile
View Makefile
AS=nasm
#ASFLAGS=-f elf64 -g
ASFLAGS=-f elf -g
#LDFLAGS=
LDFLAGS=-m elf_i386
LD=ld
SOURCES=$(wildcard *.asm)
OBJECTS=$(SOURCES:.asm=.o)
TARGETS=$(SOURCES:.asm=)
@dev001hajipro
dev001hajipro / typinggame.py
Created Jul 13, 2018
Python3+Pygame typing game
View typinggame.py
# -*- coding: utf-8 -*-
""" タイピングゲーム """
import random
import sys
import pygame
def select_word():