Skip to content

Instantly share code, notes, and snippets.

@ebith
ebith / .vimperatorrc
Created February 9, 2017 15:33
TwittperatorでURL付きツイートする時よしなにしてくれるやつ
javascript <<EOM
twtu = (title, url) => {
const args = commandline.command.split(/\s+/);
const text = args.slice(1, -1).join(' ');
const match = /^@\w{1,15}(#\d+)$/.exec(args[1]);
const r = 140 - 23 - text.length + (match ? match[1].length : 0);
if (title.length > r-7) {
title = title.slice(0, r-7) + '\u2026'
}
return `"${title}" - ${url}`;
@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 / iPhone5sInstalledPackages.md
Last active January 2, 2016 22:29
iPhone 5s, iOS 7.0.4

Installed packages

  • Action Menu
  • Action Menu Plus Pack
  • Activator
  • ActivityAction for Action Menu
  • afc2add
  • AlwaysClear
  • AppLinks
  • Ask Assistant
  • AskToCall
@ebith
ebith / SPDY-indicator.js
Last active December 19, 2015 05:39
SPDY使ってたらステータスラインに⚡を表示するプラグイン
(function(){
e = document.createElement('label');
e.id = 'liberator-status-spdy';
e.style.fontWeight = 'bold'
document.getElementById('liberator-status').appendChild(e);
statusline.addField('spdy', 'The currently SPDY status', 'liberator-status-spdy', function (node, state) {
if (state) {
node.value = '\u26A1';