This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[homebrew setting for installing to each user directory] | |
#[ENV: put them into "$HOME/.bash_profile"] | |
HOMEBREW=$HOME/.brew | |
export PATH=$HOMEBREW/bin:$PATH | |
export LD_LIBRARY_PATH=$HOMEBREW/lib:/usr/lib | |
export DYLD_FALLBACK_LIBRARY_PATH=$HOMEBREW/lib | |
export C_INCLUDE_PATH=$HOMEBREW/include | |
export CPLUS_INCLUDE_PATH=$HOMEBREW/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// clang -framework Cocoa app.m -o app | |
// ./app | |
#import <Cocoa/Cocoa.h> | |
int main() | |
{ | |
[NSAutoreleasePool new]; | |
id app = [NSApplication sharedApplication]; | |
[app setActivationPolicy:NSApplicationActivationPolicyRegular]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<!-- IMPORTANT: The current Chrome requires some origin-trial token in <meta>. | |
To register origins at the last "WebGPU REGISTER" in https://developer.chrome.com/origintrials/ | |
This token is for a Web Origin "http://localhost:8000" (maybe expired at Mar 31, 2022) | |
--> | |
<meta http-equiv="origin-trial" | |
content="AkIL+/THBoi1QEsWbX5SOuMpL6+KGAXKrZE5Bz6yHTuijzvKz2MznuLqE+MH4YSqRi/v1fDK/6JyFzgibTTeNAsAAABJeyJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjgwMDAiLCJmZWF0dXJlIjoiV2ViR1BVIiwiZXhwaXJ5IjoxNjUyODMxOTk5fQ==" /> | |
<meta http-equiv="origin-trial" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint no-unused-vars: 0, no-multi-spaces: 0 */ | |
"use strict"; | |
// [JPEG encode process] | |
// 1. RGB to YUV | |
// 2. Padding & chunk to 8x8-blocks | |
// 3. DCT | |
// 4. Quantization | |
// 5. zigzag scan | |
// 6. Huffman coding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// intel CPUID opcode | |
// see: https://en.wikipedia.org/wiki/CPUID | |
// clang -Wall -Wextra -std=c11 cpuinfo.c -o cpuinfo | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <cpuid.h> //macro __cpuid(eaxin, eaxout, ebx, ecx, edx) | |
int main() { | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docker build -t ruby-1.8.7 . | |
# docker run -it --rm ruby-1.8.7 | |
FROM ubuntu:16.04 | |
WORKDIR /root | |
RUN apt update | |
RUN apt upgrade -y | |
RUN apt install -y ruby-build autoconf subversion bison | |
RUN apt install -y mecab mecab-ipadic-utf8 wget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S deno run --allow-read --allow-run | |
// usage: deno run --allow-read --allow-run movconcat.js /Volumes/UNTITLED/Normal/F/ result.mp4 | |
import * as path from "https://deno.land/std/path/mod.ts"; | |
import * as flags from "https://deno.land/std/flags/mod.ts"; | |
const parsed = flags.parse(Deno.args); | |
const sources = parsed._.at(-2); | |
const output = parsed._.at(-1); | |
const inputs = []; | |
for await (const {name} of Deno.readDir(sources)) inputs.push(name); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Web Crypto API Example</title> | |
<script src="script.js"></script> | |
</head> | |
<body> | |
open "Web Console" of this browser | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env swift -import-objc-header cg-hidden.h | |
// $ swiftc -import-objc-header cg-hidden.h DisplayMode.swift | |
import Foundation | |
import CoreFoundation | |
import CoreGraphics | |
let display = CGMainDisplayID() | |
let count = UnsafeMutablePointer<Int32>.allocate(capacity: 1) | |
defer {count.deallocate()} | |
CGSGetNumberOfDisplayModes(display, count); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<!-- IMPORTANT: The current Chrome requires some origin-trial token in <meta>. | |
To register origins at the last "WebGPU REGISTER" in https://developer.chrome.com/origintrials/ | |
This token is for a Web Origin "http://localhost:8000" (maybe expired at Mar 31, 2022) | |
--> | |
<meta http-equiv="origin-trial" | |
content="AkIL+/THBoi1QEsWbX5SOuMpL6+KGAXKrZE5Bz6yHTuijzvKz2MznuLqE+MH4YSqRi/v1fDK/6JyFzgibTTeNAsAAABJeyJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjgwMDAiLCJmZWF0dXJlIjoiV2ViR1BVIiwiZXhwaXJ5IjoxNjUyODMxOTk5fQ==" /> | |
<meta http-equiv="origin-trial" |