Skip to content

Instantly share code, notes, and snippets.

View ttdoda's full-sized avatar

IWAMOTO Kouichi ttdoda

  • Kanagawa, Japan
View GitHub Profile
@ttdoda
ttdoda / gist:a17cd034ef56c321e427
Created May 17, 2015 13:30
MyFleetGirls error
sue@nagato% sh -x MyFleetGirls.sh
+ dirname MyFleetGirls.sh
+ cd .
+ java -jar update.jar
myfleetgirls.keystoreに変更はありません
LICENSEに変更はありません
application.conf.sampleに変更はありません
MyFleetGirls.jarは存在しません。ダウンロードします。
おやっ、IOExceptionです!
java.io.EOFException
@ttdoda
ttdoda / sayaka.php.diff
Created June 11, 2015 08:46
sixel画像表示後のカーソル位置非互換の吸収
diff --git a/sayaka.php b/sayaka.php
index cdcf37b..900ed7e 100644
--- a/sayaka.php
+++ b/sayaka.php
@@ -426,9 +426,10 @@ function showstatus($status, $s)
// 今のところローカルアカウントはない
$profile_image_url = $s->user->profile_image_url;
+ print "\n\n\n".CSI."3A".ESC."7";
show_icon(unescape($s->user->screen_name), $profile_image_url);
@ttdoda
ttdoda / gist:dbe31e47ac75ba488f59
Created June 23, 2015 07:02
syscons ws_{x,y}pixel対応
Index: sys/dev/syscons/scvidctl.c
===================================================================
--- sys/dev/syscons/scvidctl.c (revision 284698)
+++ sys/dev/syscons/scvidctl.c (working copy)
@@ -237,6 +237,8 @@
return 0;
wsz.ws_col = scp->xsize;
wsz.ws_row = scp->ysize;
+ wsz.ws_xpixel = scp->xpixel;
+ wsz.ws_ypixel = scp->ypixel;
@ttdoda
ttdoda / w3m-sgr-style.diff
Last active August 29, 2015 14:26 — forked from saitoha/w3m-sgr-style.diff
SGR 1006 mouse reporting for w3m
Index: keybind.c
===================================================================
RCS file: /cvsroot/w3m/w3m/keybind.c,v
retrieving revision 1.10
diff -u -r1.10 keybind.c
--- keybind.c 29 May 2006 12:17:25 -0000 1.10
+++ keybind.c 14 Jul 2012 21:20:27 -0000
@@ -91,7 +91,7 @@
/* 0 1 2 3 4 5 6 7 */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
diff --git a/main.c b/main.c
index 9cac333..7c5780c 100644
--- a/main.c
+++ b/main.c
@@ -5561,6 +5561,7 @@ DEFUN(sgrmouse, SGRMOUSE, "SGR 1006 mouse operation")
else
return;
} while (1);
+ if (x>0) x--;
@ttdoda
ttdoda / w3m-sgr-style-menu.diff
Last active August 29, 2015 14:26
SGR 1006 mouse reporting for w3m's menu
--- menu.c.orig 2011-01-04 18:22:23.000000000 +0900
+++ menu.c 2015-08-05 17:37:19.035511000 +0900
@@ -57,6 +57,7 @@
static int mClose(char c);
static int mSusp(char c);
static int mMouse(char c);
+static int mSgrMouse(char c);
static int mSrchF(char c);
static int mSrchB(char c);
static int mSrchN(char c);
@ttdoda
ttdoda / moduli-bits.lis
Created August 21, 2015 11:45
OpenSSH portable moduli bits
ver 1024 1536 2048 3072 3192 4096 6144 7680 8192
openssh-2.9.9p1 38 31 36 - 36 14 - - -
openssh-2.9.9p2 38 31 36 - 36 14 - - -
openssh-3.0p1 38 31 36 - 36 14 - - -
openssh-3.0.1p1 38 31 36 - 36 14 - - -
openssh-3.0.2p1 38 31 36 - 36 14 - - -
openssh-3.1p1 38 31 36 - 36 14 - - -
openssh-3.2.2p1 38 31 36 - 36 14 - - -
openssh-3.2.3p1 38 31 36 - 36 14 - - -
openssh-3.3p1 38 31 36 - 36 14 - - -
@ttdoda
ttdoda / byonbyon.rb
Last active April 26, 2017 01:17
端末のウィンドウが勝手にびよんびよんなってたのしいやつ
#!/usr/bin/env ruby
# License: CC0
include Math
STDOUT.sync = 1
case `env LC_ALL=C stty -a`
when / (\d+) rows; (\d+) columns/
rows = $1.to_i
@ttdoda
ttdoda / pyonpyon.rb
Last active August 4, 2017 18:56
あぁ^~端末がぴょんぴょんするんじゃぁ^~
#!/usr/bin/env ruby
#
# License: CC0
#
gravity = 3
require 'timeout'
include Math
$stdout.sync = 1
@ttdoda
ttdoda / gist:fc7fa7ea1b774f6597f8
Created November 24, 2015 13:50
Graf Zeppelin ドロップ確率
% ruby -e '10.step(200,10) do |i| puts "%3d: %f\n"%[i, (1 - (1-0.025) **i) * 100] end'
10: 22.367038
20: 39.731232
30: 53.211570
40: 63.676756
50: 71.801190
60: 78.108428
70: 83.004924
80: 86.806219
90: 89.757277