This file contains hidden or 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
socat Examples | |
=============== | |
* 注意 | |
- SYSTEM で : を使う時は必ずエスケープすること | |
* 相手に接続 | |
# telnet, netcat, socat それぞれの場合 | |
$ socat - TCP:127.0.0.1:8000 |
This file contains hidden or 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
#!/bin/bash | |
brew update | |
brew tap sanemat/font | |
brew tap caskroom/cask | |
brew cask install coteditor | |
brew cask install evernote | |
brew cask install google-chrome | |
brew cask install iterm2 | |
brew cask install menumeters |
This file contains hidden or 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
# prefixキーをctrl+tへ変更 | |
set-option -g prefix C-t | |
bind-key C-t send-prefix | |
# ターミナルを256色にする | |
set -g default-terminal "xterm-256color" | |
# Shift + 上下左右でペインを移動できるようにする。 | |
bind -n C-left select-pane -L |
This file contains hidden or 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
#!/bin/zsh | |
echo -en "$1" | hexdump -v -e '/1 "%02x "' | tr ' ' '\n' | xargs -I{} zsh -lc 'printf "\\\0%03d\n" $(echo $[[#8] 16#{}] | cut -b3-)' | tr -d '\n' |
This file contains hidden or 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
#!/bin/bash | |
ruby -e "require 'mysql'; p Mysql.new('hostname', 'username', 'password', 'dbname')" |
This file contains hidden or 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
$ echo -en "[email protected]\[email protected]\0password" | base64 | pbcopy | |
$ socat -v SSL:smtp.gmail.com:465,verify=0,crlf - | |
EHLO localhost | |
AUTH PLAIN c3VwcG9ydEBtZWRpY.... | |
MAIL FROM: <[email protected]> | |
This file contains hidden or 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
# ローカルの 2999 をリモートの 3000 にフォワード(接続)させる | |
$ ssh -vN -L 2999:127.0.0.1:3000 develop |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<Response> | |
<Say language="ja-jp" voice="woman">サーバーおちたよ!</Say> | |
</Response> |
This file contains hidden or 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
echo -en "GET / HTTP/1.1\r\nHost: localhost\r\nUser-Agent: curl\r\n\r\n" | socat UNIX-CONNECT:/var/lib/web/medicil.sock - |
This file contains hidden or 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
curl --header 'Host: example.jp' http://127.0.0.1/ |