This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Perl ワンライナーサンプル集 | |
■概要 | |
障害解析のためのログの調査、非互換対応でのソースコードの調査といった | |
テキスト処理で使った Perl ワンライナーのサンプル集です。 | |
Perl ワンライナーは以下の点が良いと思います。 | |
・Perl は Oracle Database (10g以降) に同梱されている。 | |
従って、Windows プラットフォームでも使える。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if(0)==(0) ECHO OFF | |
CScript //NoLogo //E:JScript "%~f0" %* | |
GOTO :EOF | |
@end | |
var COLUMN_INFOs = { | |
k: { | |
drive: { width: 5, align: "left" }, | |
type: { width: 4, align: "left" }, | |
total: { width: 14, align: "right" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# SIXEL color graphics DEMO | |
# | |
# xterm pl#301 with --enable-sixel-graphics option | |
# gnuplot with --with-bitmap-terminals option | |
# | |
# Now the color palette of xterm VT-340 mode is limited to 16. | |
# If you want to change it to 256, apply the following patch. | |
# https://gist.github.com/saitoha/7822989/raw/20727b88f0f826bfcb9d644907944b29a456b67f/graphics.c.diff | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 私が考える安全なプログラムを書くために必要なこと | |
今も昔も「入力によって挙動が大幅に変わるAPI」が世の中には多数存在していて、プログラマが本来意図した挙動と異なる動作を引き起こしている。 | |
- ファイルを開こうとしたらコマンドを実行できてしまったり | |
- CSSセレクタを書いてるつもりがHTMLタグを生成してしまったり | |
- SELECT文を発行するつもりがDELETE文を発行できてしまったり | |
こういったときに | |
- 入力値検証をしないと危険になる |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- xterm-300/graphics.c 2013-12-06 21:26:36.000000000 +0900 | |
+++ xterm-300/graphics.c 2013-12-06 21:26:13.000000000 +0900 | |
@@ -418,7 +418,7 @@ | |
graphic->valid_registers = 4; | |
break; | |
case 340: | |
- graphic->valid_registers = 16; | |
+ graphic->valid_registers = 256; | |
break; | |
default: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% screen | |
% cat test.png | pngtopnm | pnmquant 256 | ppmtosixel | ./penetrate.py && cat | |
% cat test.png | sixelconv | ./penetrate.py && cat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
gather_facts: no | |
sudo: no | |
tasks: | |
- name: run ssh-keyscan to add keys to known_hosts | |
local_action: shell ssh-keyscan {{ ansible_ssh_host }} >> ~/.ssh/known_hosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let &t_ti = &t_ti . "\e[?6h\e[?69h" | |
let &t_te = "\e[?69l\e[?6l" . &t_te | |
let &t_CV = "\e[%i%p1%d;%p2%ds" | |
let &t_CS = "y" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r e56bf2af53c0 src/os_unix.c | |
--- a/src/os_unix.c Wed May 15 23:13:10 2013 +0200 | |
+++ b/src/os_unix.c Tue May 21 00:04:11 2013 +0900 | |
@@ -2190,6 +2190,7 @@ | |
|| STRNICMP(name, "kterm", 5) == 0 | |
|| STRNICMP(name, "mlterm", 6) == 0 | |
|| STRNICMP(name, "rxvt", 4) == 0 | |
+ || STRNICMP(name, "screen", 6) == 0 | |
|| STRCMP(name, "builtin_xterm") == 0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -cr vim.ba8835947b8b/runtime/doc/options.txt vim/runtime/doc/options.txt | |
*** vim.ba8835947b8b/runtime/doc/options.txt 2013-02-10 14:03:58.000000000 +0900 | |
--- vim/runtime/doc/options.txt 2013-02-10 14:03:58.000000000 +0900 | |
*************** | |
*** 699,704 **** | |
--- 699,709 ---- | |
when the system locale is set to one of CJK locales. See Unicode | |
Standard Annex #11 (http://www.unicode.org/reports/tr11). | |
+ Vim may set this option automatically at the startup time. |