Skip to content

Instantly share code, notes, and snippets.

NAKASHIMA, Makoto gifnksm

Block or report user

Report or block gifnksm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gifnksm
gifnksm / .gitignore
Last active Oct 12, 2017
Rust array index bounds check benchmark
@gifnksm
gifnksm / nicovideo_getFlv.js
Created Nov 10, 2010
ニコニコ動画でgetFlvを呼び出す関数
View nicovideo_getFlv.js
(function() {
if (!('nicovideo_getFlv' in window)) {
const Getter = function(videoID) {
this._videoID = videoID;
this._callbacks = [];
};
Getter.prototype = {
_videoID: null,
_lock: false,
@gifnksm
gifnksm / hello.lto.js
Created Mar 8, 2016
hello.rs を JS へコンパイルした結果
View hello.lto.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
View Makefile
subdirs=c d java haskell rust
.PHONY: all clean $(subdirs)
all: $(subdirs)
clean: $(subdirs)
$(subdirs):
make -C $@ $(MAKECMDGOALS)
View gunosy_redirect.user.js
// ==UserScript==
// @name gunosy redirect
// @namespace gifnksm.hatenablog.jp
// @include https://gunosy.com/articles/*
// @version 1.0.2
// @grant none
// @downloadURL https://gist.github.com/gifnksm/cc0ae271dab4b31036d1/raw/gunosy_redirect.user.js
// @author NAKASHIMA, Makoto <makoto.nksm+github@gmail.com>
// ==/UserScript==
View titech_portal_auto_login.user.js
// ==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
View pager.js
(function() {
const NAMESPACE = 'mfp.xrea.jp';
if (!(NAMESPACE in window))
window[NAMESPACE] = {};
if (window[NAMESPACE].Pager !== undefined)
return;
const Pager = function(namePrefix) {
this._namePrefix = namePrefix;
this._callbacks = [];
@gifnksm
gifnksm / data_format.txt
Created Dec 6, 2010
ニコタグからタグの履歴情報を取得する。
View data_format.txt
Data = {
count: Integer, // タグの個数
first: Date, // タグ情報を最初に取得した日時
last: Date, // タグ情報を最後に取得した日時
tags: [Tag] // タグ情報の配列
};
Tag = {
id: Integer, // タグのID
name: String, // タグ名
@gifnksm
gifnksm / datagrid.js
Created Dec 6, 2010
簡易的な DataGrid
View datagrid.js
(function() {
const NAMESPACE = 'mfp.xrea.jp';
if (!(NAMESPACE in window))
window[NAMESPACE] = {};
if (window[NAMESPACE].DataGrid !== undefined)
return;
const DataGrid = function(property, namePrefix) {
this._property = new DataGrid.Property(property);
this._namePrefix = namePrefix || '';
@gifnksm
gifnksm / .zshrc
Created Oct 25, 2010
ssh-agentをターミナル間で共有する
View .zshrc
function ssh-start() {
ssh-agent -s > "${HOME}/.ssh/agent-env"
. "${HOME}/.ssh/agent-env"
ssh-add
}
if [ -e "${HOME}/.ssh/agent-env" ]; then
isAliveAgent=`ps -ef | grep "/ssh-agent" | grep -v grep | wc -l`
if [ $isAliveAgent = 1 ]; then
echo "ssh-agent is alive"
You can’t perform that action at this time.