Skip to content

Instantly share code, notes, and snippets.

@suzusime
suzusime / import-all-deno-std.ts
Last active April 10, 2024 17:20
Import All deno std@0.221.0
// #region import_std
import * as archive from "https://deno.land/std@0.221.0/archive/mod.ts";
import * as assert from "https://deno.land/std@0.221.0/assert/mod.ts";
import * as async from "https://deno.land/std@0.221.0/async/mod.ts";
import * as bytes from "https://deno.land/std@0.221.0/bytes/mod.ts";
import * as cli from "https://deno.land/std@0.221.0/cli/mod.ts";
import * as collections from "https://deno.land/std@0.221.0/collections/mod.ts";
import * as std_console from "https://deno.land/std@0.221.0/console/mod.ts";
import * as crypto from "https://deno.land/std@0.221.0/crypto/mod.ts";
import * as csv from "https://deno.land/std@0.221.0/csv/mod.ts";
@suzusime
suzusime / FontTool.cs
Created October 31, 2016 18:00
using SharpFont with Monogame
#region MIT License
/*Copyright (c) 2016 Robert Rouhani <robert.rouhani@gmail.com>
SharpFont based on Tao.FreeType, Copyright (c) 2003-2007 Tao Framework Team
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
@suzusime
suzusime / main.rs
Created May 20, 2021 15:45
『ゲームプログラミングC++』の第一章をもとにrust-sdl2で書いたもの
extern crate sdl2;
use sdl2::event::Event;
use sdl2::keyboard::Keycode;
use sdl2::pixels::Color;
use std::time::Duration;
struct Game {
sdl_context: sdl2::Sdl, // SDL全体オブジェクト
canvas: sdl2::render::Canvas<sdl2::video::Window>, // Rendererの代わり
}
@suzusime
suzusime / _template.pl
Last active December 24, 2020 16:14
perlでスクリプトを書くときのテンプレ
#!/usr/bin/env perl
use strict;
use warnings;
use 5.014;
use utf8;
use open ':encoding(UTF-8)';
use Encode::Locale;
binmode(STDIN, ":encoding(console_in)");
binmode(STDOUT, ":encoding(console_out)");
binmode(STDERR, ":encoding(console_out)");
@suzusime
suzusime / scraping.pl
Created May 7, 2019 18:49
スクレイピングする簡単な例
#!/usr/bin/env perl
use strict;
use warnings;
use 5.014;
use utf8;
use open ':encoding(utf8)';
use Encode::Locale;
binmode(STDIN, ":encoding(console_in)");
binmode(STDOUT, ":encoding(console_out)");
binmode(STDERR, ":encoding(console_out)");
@suzusime
suzusime / cps.ml
Last active May 3, 2019 09:04
継続渡し形式への変換例
(* Example of Continuation Passing Style *)
(* cf. http://practical-scheme.net/docs/cont-j.html *)
type tree =
Leaf
| Node of int * tree * tree
;;
let rec sum_nodes t =
match t with
### Keybase proof
I hereby claim:
* I am suzusime on github.
* I am suzusime (https://keybase.io/suzusime) on keybase.
* I have a public key ASB5EYaMSvgqcXvLaomoEYpNhg50fJYXEErZQQQie1FSxQo
To claim this, I am signing this object:
@suzusime
suzusime / vue-sample.html
Created October 14, 2018 18:25
vue.jsのてすと
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
{{ message }}
</div>
<div id="app-2">
@suzusime
suzusime / index.html
Created October 5, 2018 09:22
sample_vue
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
{{ message }}
</div>
<div id="app-2">
if exists('b:did_ftplugin_tex_flag')
finish
endif
let b:did_ftplugin_tex_flag = 1
scriptencoding utf-8
" 数式用のキーマップに設定する函数
:function! s:SetKeyMap()
:ino <buffer> B@ B
:ino <buffer> B<Space> B<Space>