Skip to content

Instantly share code, notes, and snippets.

View suinua's full-sized avatar
🦃
えぶりでい たーきー

suinua suinua

🦃
えぶりでい たーきー
View GitHub Profile
@suinua
suinua / data.R
Last active November 20, 2023 08:50
JapUS <-
list(set1 = structure(list(Japan = c(1L,2L,0L,3L,0L,4L,0L,5L,
0L,0L,6L,7L,0L,8L,0L,9L,0L,10L,0L,0L,0L,11L,0L,12L,0L,0L,0L,
0L,13L,0L,14L,15L,16L,0L,0L,17L,0L,0L,0L,0L,18L,0L,19L,0L,),
US = c(0L,0L,1L,0L,2L,0L,3L,0L,4L,5L,0L,0L,6L,0L,7L,0L,8L,0L,
9L,10L,11L,0L,12L,0L,13L,14L,15L,16L,0L,17L,0L,0L,0L,18L,19L,
0L,20L,21L,22L,23L,0L,24L,0L,25L,)), class = "data.frame",
row.names = c(NA, -44L)), set2 = structure(list(Japan = c(0L,1L,
0L,0L,2L,0L,3L,0L,4L,0L,5L,0L,0L,6L,0L,7L,0L,8L,0L,9L,10L,0L,11L,
0L,12L,13L,0L,14L,15L,0L,16L,0L,0L,17L,18L,19L,0L,20L,21L,0L,22L,
@suinua
suinua / index.html
Last active March 23, 2022 07:28
Dartでスクロールに連動する目次
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
<script defer src="main.dart.js"></script>
</head>
<body>
<div class="wrap">
@suinua
suinua / download.dart
Created September 8, 2021 10:24
dart ファイルをダウンロードさせる
void download(String text) {
String encodedFileContents = Uri.encodeComponent(text);
//text file
new AnchorElement(href: "data:text/plain;charset=utf-8,$text")
..setAttribute("download", "manifest.json")
..click();
}
@suinua
suinua / firebase_index.html
Last active September 8, 2021 10:25
dart2js firebase
<script src="https://www.gstatic.com/firebasejs/3.2.1/firebase.js"></script>
@suinua
suinua / main.dart
Created September 8, 2021 10:17
dart mp3再生
void main() {
AudioElement audioElement = AudioElement();
audioElement.src = "audio/--.mp3";
audioElement.play();
}
@suinua
suinua / save_player_skin_as_png.php
Last active May 23, 2021 03:39
プレイヤーのスキンをpngファイルで保存します
public function onJoin(PlayerJoinEvent $event) {
$player = $event->getPlayer();
$skin_raw = $player->getSkin()->getSkinData();
$height = 64;
$width = 64;
switch (strlen($skin_raw)) {
case 64 * 32 * 4:
$height = 32;