Skip to content

Instantly share code, notes, and snippets.

View ebith's full-sized avatar

ebith ebith

  • Nara, Japan
  • 18:37 (UTC +09:00)
  • X @ebith
View GitHub Profile
@ebith
ebith / gyazo-server.lua
Created September 25, 2014 22:24
lua-nginx-moduleで動くGyazoServer
local upload = require "resty.upload"
math.randomseed(ngx.time())
local function random_string(digit)
local alphabet = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
local result = ""
repeat
result = result .. alphabet[math.random(36)]
digit = digit - 1
until digit == 0
@ebith
ebith / index.html
Last active August 1, 2024 11:15
新・世界樹の迷宮2 ファフニールの騎士 QRコード
<!DOCTYPE html><html><head><meta charset="utf-8"><title>新・世界樹の迷宮2 ファフニールの騎士 QRコード</title><style>.container{display:flex;flex-wrap:wrap}ul{list-style:none;margin-top:0}.lv10:before{content:'\2605'}.lv1:before{content:'1'}.lv2:before{content:'2'}.lv3:before{content:'3'}.lv4:before{content:'4'}.lv5:before{content:'5'}.lv6:before{content:'6'}.lv7:before{content:'7'}.lv8:before{content:'8'}.lv9:before{content:'9'}</style></head><body><div class="container"><div class="item alchemist"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQsAAAELAQAAAADmLp7/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAABJ0AAASdAHeZh94AAAAAmJLR0QAAd2KE6QAAAaNSURBVGje7dqxrew8DgXgYzBQ5mmAgNpQppasBmyrAbslZWpDgBqQMwWCzwZz73sbLLCJgN3gHzj8AnmGpEhiwP/2KfiH/K9JAzZT72SbGbvR1cvlFa4EViYs88jDsRnb/IBByGP39YJu3r6uLJnPRJJ09/amnIans6cZq7GR9skaMsJUcnR7euyQ09nXlxW6mhI4n2yop1FALpSQAGAFlkTOJRyBgNNABXhnibRP16Xz/vsDTCANCFn/8/M3pCYQkg/HDl1oX4dPrpFyJ/vk+m9JMoE0UzbDF2ODfjKOLifkRTkoJ2ycR9jZDO/MZmzzjEmXXk9X4IS5
@ebith
ebith / 3DS.markdown
Last active August 29, 2015 14:19
持ってるゲームのリスト
  • スーパーロボット大戦UX
  • ゼルダの伝説 神々のトライフォース2
  • ドラゴンクエストVII
  • ファイアーエムブレム 覚醒
  • ブレイブリーセカンド
  • ブレイブリーデフォルト
  • メタルマックス4
  • モンスターハンター4G
  • 世界樹と不思議のダンジョン
  • 世界樹の迷宮IV
@ebith
ebith / yaopen.js
Last active August 29, 2015 14:22
(function() {
var sites, _ref;
sites = ((_ref = liberator.globalVariables.yaopen) != null ? _ref.sites : void 0) || {
tts: {
url: 'http://translate.google.com/translate_tts?tl=en&q=%ARG%'
},
steamdb: {
url: 'https://steamdb.info/search/?a=app&q=%ARG%'
},
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){
@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.
@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 / 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 / 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) {

Docker Cheatsheet

Commands

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

docker run --interactive --tty IMAGE

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

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