Skip to content

Instantly share code, notes, and snippets.

@gifnksm
gifnksm / Makefile
Last active December 10, 2015 01:38
subdirs=c d java haskell rust
.PHONY: all clean $(subdirs)
all: $(subdirs)
clean: $(subdirs)
$(subdirs):
make -C $@ $(MAKECMDGOALS)
@gifnksm
gifnksm / hello.lto.js
Created March 8, 2016 12:48
hello.rs を JS へコンパイルした結果
This file has been truncated, but you can view the full file.
// The Module object: Our interface to the outside world. We import
// and export values on it, and do the work to get that through
// closure compiler if necessary. There are various ways Module can be used:
// 1. Not defined. We create it here
// 2. A function parameter, function(Module) { ..generated code.. }
// 3. pre-run appended it, var Module = {}; ..generated code..
// 4. External script tag defines var Module.
// We need to do an eval in order to handle the closure compiler
// case, where this code here is minified but Module was defined
// elsewhere (e.g. case 4 above). We also need to check if Module
@gifnksm
gifnksm / nicovideo_getFlv.js
Created November 10, 2010 03:42
ニコニコ動画でgetFlvを呼び出す関数
(function() {
if (!('nicovideo_getFlv' in window)) {
const Getter = function(videoID) {
this._videoID = videoID;
this._callbacks = [];
};
Getter.prototype = {
_videoID: null,
_lock: false,
@gifnksm
gifnksm / .gitignore
Last active October 25, 2019 05:12
Rust array index bounds check benchmark
target
// ==UserScript==
// @name Titech Portal Auto Login
// @namespace http://www.titech.ac.jp/
// @id titech-portal-auto-login@www.titech.ac.jp
// @description 東工大ポータルに自動的にログインします
// @author NAKASHIMA, Makoto <makoto.nksm@gmail.com>
// @include https://portal1.nap.gsic.titech.ac.jp/*
// @include https://portal.nap.gsic.titech.ac.jp/*
// @include http://portal.titech.ac.jp/*
// @jsversion 1.8
@gifnksm
gifnksm / Makefile
Last active August 19, 2023 10:01
Makefile Template
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --no-builtin-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
.SECONDARY: # don't remove intermediate files
.SECONDEXPANSION: