Skip to content

Instantly share code, notes, and snippets.

@ebith
ebith / extractArchive.js
Last active October 1, 2019 11:20
7-Zip付属の7zG.exeで二重フォルダを防ぎ賢く展開するWSH JScript
var wshell = new ActiveXObject('WScript.Shell');
var fso = new ActiveXObject( 'Scripting.FileSystemObject');
var archivePath = WScript.arguments(0);
var dirPath = wshell.currentDirectory + '/' + fso.getBaseName(archivePath);
var process = wshell.Exec('"C:/Program Files/7-zip/7zG.exe" x "' + archivePath + '" -aou -spe -o"' + dirPath + '"');
while (process.status !== 1) {
WScript.sleep(10);
}
@ebith
ebith / say.js
Created July 31, 2016 12:59
say command for Windows
var args = [];
for (var i = 0; i < WScript.Arguments.length; i++) {
args.push(WScript.Arguments(i));
}
new ActiveXObject('SAPI.SpVoice').Speak(args.join(' '));
// ==UserScript==
// @name steam queue clicker
// @version 1.0
// @author ebith
// @include http://store.steampowered.com/app/*
// @include http://store.steampowered.com/explore/
// @noframes
// ==/UserScript==
document.addEventListener('DOMContentLoaded', () => {

Docker Cheatsheet

Commands

イメージを起動する C-p C-qでデタッチ

docker run --interactive --tty IMAGE

デーモンモードで起動する

docker run --detach --interactive --tty IMAGE

@ebith
ebith / tts.js
Created March 18, 2016 11:32
発言を読み上げるLimeChat用スクリプト
// Require:
// SpeechPlatformRuntime.msi - https://www.microsoft.com/en-us/download/details.aspx?id=27225
// MSSpeech_TTS_ja-JP_Haruka.msi - https://www.microsoft.com/en-us/download/details.aspx?id=27224
var tts;
function event::onLoad() {
tts = new ActiveXObject('Speech.SpVoice');
}
function event::onChannelText(prefix, channel, text) {
@ebith
ebith / recipe.md
Last active February 16, 2016 23:44
フライパンで作るバウムクーヘン - http://www.nicovideo.jp/watch/sm28177746

フライパンで作るバウムクーヘン - http://www.nicovideo.jp/watch/sm28177746

材料

  • ホットケーキミックス 110g
  • アーモンドプードル 40g
  • 有塩バター(溶かしておく) 50g
  • グラニュー糖 50g
  • 卵 2個
  • 牛乳 150ml
  • ラム 10ml
@ebith
ebith / zenzaWatch.js
Last active January 16, 2016 14:53
ZenzaWatch - https://greasyfork.org/ja/scripts/14391-zenzawatch のVimperatorプラグイン
(() => {
const zwUrl = 'http://www.nicovideo.jp/my#ZenzaWatch'
const zw = () => { return zwBrowser.contentWindow.wrappedJSObject.ZenzaWatch; }
let zwBrowser;
const subCommands = [
// new Command([''], '', (args) => {}, {}, true),
new Command(['executeCommand', 'exec'], '', (args) => {
let table = {
'%TITLE%': () => { return zw().debug.dialog._videoInfo.getTitle(); },
'%URL%': () => { return `http://www.nicovideo.jp/watch/${zw().debug.dialog._watchId}`; },
@ebith
ebith / index.html
Created September 3, 2015 15:59
DQ8の錬金釜レシピを検索する
<!DOCTYPE html><html lang="ja"><head><meta charset="utf-8"><title>錬金釜レシピ 逆引き検索 (ドラゴンクエストVIII 空と海と大地と呪われし姫君)</title><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.css"><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/datatables/1.10.9/css/jquery.dataTables.min.css"><script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script><script src="//cdnjs.cloudflare.com/ajax/libs/datatables/1.10.9/js/jquery.dataTables.min.js"></script><script src="main.js"></script><style>.cloak{color:#fff} .page-header{text-align:center} .footer{text-align: right}</style></head><body><div class="page-header"><h1>錬金釜レシピ 逆引き検索</h1><label id="mode"><input type="checkbox"> 正引きモード</label></div><div class="container"><table id="table" class="table"><thead><tr><th>素材</th><th class="info">完成品</th><th>レシピ</th><th class="cloak">レシピ</th><th class="cloak">レシピ</th></tr></thead></table><div class="footer">via <a href="http://www.geocities.jp/dorakie/">http://www.
commands.addUserCommand(
['sitesearch'],
'Search in this site',
function (args) {
let url = window.content.location.hostname;
[
/d\.hatena\.ne\.jp/,
/www\d+\.atwiki\.jp/,
/wikiwiki\.jp/,
].forEach(function(r){