Skip to content

Instantly share code, notes, and snippets.

View Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5's full-sized avatar

Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5

View GitHub Profile
@Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5
Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5 / memo.html
Created April 6, 2017 19:35
A simple notepad that can interactively write Markdown syntax.
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>memo.md</title>
<meta name="description" content="README.md">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/codemirror.css" crossorigin="anonymous">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.6/marked.js" crossorigin="anonymous"></script>
@Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5
Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5 / scene.rb
Last active November 27, 2016 06:59
IRPC2016で使用した薄いフレームワークより状態遷移を少しだけ手軽にする仕掛け。
#
# ほんの少しですが、手軽に状態遷移機械を作ることができます。
#
require 'dxruby'
class GameBase
# 状態遷移を sceneで指定されたシンボルで示されるメソッドから開始する。
# その際に、paramsで指定された引数が渡される。
// for For image to be given to FreeH264.
class yuv420_planar {
private:
static void yuv_to_bgr(unsigned char bgr[], const unsigned char y, const unsigned char u, const unsigned char v) {
auto c = static_cast<int>(y) - 16;
auto d = static_cast<int>(u) - 128;
auto e = static_cast<int>(v) - 128;
auto _r = (298 * c + 409 * e + 128) >> 8;
auto _g = (298 * c - 100 * d - 208 * e + 128) >> 8;
@Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5
Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5 / TopologicalSort.cs
Created June 18, 2016 15:15
Topological Sorting (Kahn's algorithm) implemented in C#
using System;
using System.Collections.Generic;
using System.Linq;
namespace TopologicalSort {
static class Program {
static void Main() {
//
// digraph G {
// "7" -> "11"
@Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5
Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5 / nwget.cs
Last active June 13, 2016 09:21
wget like tools for .NET 3.5 Client Profile
/**
*
* wget like tools for .NET 3.5 Client Profile
*
* Build:
* 1. Perform either
* A) Open the "Command Prompt" from the Start menu .
* B) Press the Windows key + R key , and enter 'cmd.exe' to shown dialog box.
* 2. enter %windir%\Microsoft.NET\Framework\v3.5\csc.exe nwget.cs
*
@Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5
Sup3rc4l1fr4g1l1571c3xp14l1d0c10u5 / SelfExtractZip.cs
Last active June 13, 2016 09:20
Example of Self-extracting archive for .NET 3.5 Client Profile
/**
*
* Example of Self-extracting archive for .NET 3.5 Client Profile
*
* Dependency:
* https://github.com/yallie/unzip/blob/master/Unzip.cs
*
* Build:
* 1. Perform either
* A) Open the "Command Prompt" from the Start menu .