Skip to content

Instantly share code, notes, and snippets.

@fu-sen
fu-sen / neocities-cli-switch.bat
Last active February 12, 2019 12:03
Neocities CLI User SWITCH (Windows Batch file) | https://github.com/neocities/neocities-ruby/issues/9
@echo off
setlocal
if "%1"=="" (
set /p USER="input user name>"
) else (
set USER=%1
)
C:
@fu-sen
fu-sen / app.yaml
Created March 29, 2019 10:02
301 forward / redirect from your-custom-domain.example/.* to example.com with Google App Engine, Only this!
runtime: php72
@fu-sen
fu-sen / balloon.c
Created July 1, 2019 02:47
z88dk sprite sample 8x8
char sprite[] = { 8, 8,
0x0e /* ....###. */,
0x1d /* ...###.# */,
0x1f /* ...##### */,
0x1f /* ...##### */,
0x0e /* ....###. */,
0x08 /* ....#... */,
0x10 /* ...#.... */,
0xe0 /* ###..... */
};
@fu-sen
fu-sen / 5x5.c
Created July 1, 2019 02:55
z88dk sprite sample 5x5
char sprite[] = { 5, 5,
0x70 /* .###.... */,
0xe8 /* ###.#... */,
0xf8 /* #####... */,
0xf8 /* #####... */,
0x70 /* .###.... */
};
@fu-sen
fu-sen / sprite.c
Last active July 1, 2019 04:26
z88dk sprite sample
#include <graphics.h>
#include <games.h>
#include <stdio.h>
char balloon[] = { 8, 8,
0x0e, 0x1d, 0x1f, 0x1f, 0x0e, 0x08, 0x10, 0xe0
};
void main(){
clg();
@fu-sen
fu-sen / text.c
Last active December 4, 2019 03:38
text sample | z88dk
#include <stdio.h>
void main() {
for (int y=1; y<=6; y++) {
for (int x=1; x<=24; x++) {
printf("%c[%u;%uH ", 27, y, x);
}
}
printf("%c[%u;%uH",27,2,2); // locate
@fu-sen
fu-sen / test.c
Last active December 4, 2019 03:39
z88dk PC-E200/G text test
#include <graphics.h>
#include <conio.h>
#include <stdio.h>
main(){
clg();
gotoxy(1,1);
printf("test\n");
// IchigoLatte PanCake library
// CC0 1.0 Public Domain Dedication - https://creativecommons.org/publicdomain/zero/1.0/
function pc-init(){
uart(10);
}
function pc-clear(cn){
uart(128,4,0,cn);
}
10 N=RND(1)*95+1
20 PLAY "n=N;"
30 GOTO 10
@fu-sen
fu-sen / ledtest.bas
Last active December 18, 2019 14:22
液晶の縦数ヶ所が表示されなくなった時に試すプログラム - PC-G850V https://poke-com.jimdofree.com/
10 CLS
20 FOR X=0 TO 143
30 FOR Y=0 TO 49
40 LINE (X,0)-(X,47),X,BF
45 WAIT 3
50 NEXT Y
60 NEXT X
70 GOTO 20