[CentralOH] 2013-05-02 道場 Scribbles 落書/惡文?
jep200404 at columbus.rr.com
jep200404 at columbus.rr.com
Fri May 3 04:55:40 CEST 2013
weekly bait:
Unsolved:
How to indent code block in ipython notebook?
In other words, how to do ^T, ^D, <<, >> in ipython notebook (like vi)?
Netcat (nc) is my friend and should be yours too.
encrypted instant messaging
# unbuffered version
tr 'A-Za-z' 'N-ZA-Mn-za-m' | nc -l 8000 | tr 'A-Za-z' 'N-ZA-Mn-za-m'
how to make above command more real-timey
PIPE_BUF
unbuffer
stdbuf
on server (at 172.17.153.150):
stdbuf -i0 -o0 tr 'A-Za-z' 'N-ZA-Mn-za-m' | stdbuf -i0 -o0 nc -l 8000 | stdbuf -i0 -o0 tr 'A-Za-z' 'N-ZA-Mn-za-m'
on client:
stdbuf -i0 -o0 tr 'A-Za-z' 'N-ZA-Mn-za-m' | stdbuf -i0 -o0 nc 172.17.153.150 8000 | stdbuf -i0 -o0 tr 'A-Za-z' 'N-ZA-Mn-za-m'
start the command on the server before the command on the client
server:
tar cvzf - foo | nc -l 8000
client:
nc 172.17.153.150 8000 | tee foo.tgz | tar tvzf - | less
# tar xzf foo.tgz ;# after reviewing output of tar tvzf - above.
sudo apt-get install expect-dev ;# for unbuffer command,
# for which stdbuf is preferred. Next time don't install expect-dev.
netcat is the one true email client
grep smtp /etc/services
nc smtp-server.example.org `grep ^smtp /etc/services | awk '{print $2}' | awk -F/ '{print $1}'25`
nc smtp-server.example.org `grep ^smtp /etc/services | tr / ' ' | awk '{print $2}'`
nc smtp-server.example.org 25
HELO relay.example.org
http://en.wikipedia.org/wiki/SMTP#SMTP_transport_example
# battery exerciser
i=2;while true; do if [ `factor $i | wc -w` -eq 2 ]; then echo $i;fi;i=`expr $i + 1`;done
tmux
no body uses default settings
change ^B to ^A.
cat ~/.tmux.conf
unbind C-b
set -g prefix C-a
# ^A^A toggles to last window
bind-key C-a last-window
setw -g aggressive-resize on
scratch completely absorbed one new student 學生.
http://www.ted.com/talks/mitch_resnick_let_s_teach_kids_to_code.html
http://en.wikipedia.org/wiki/Scratch
http://www.code.org/
code.org/learn/scratch
# Review Ken Robinson's talk yet again.
http://en.wikipedia.org/wiki/OLPC_XO-1
http://en.wikipedia.org/wiki/Sugar_(desktop_environment)
Scratch
man 7 pipe
man write
man 1 write
man wall
man 2 write ;# see Stevens' APUE
man nc
man stdbuf
man unbuffer
man ascii
man man
http://en.wikipedia.org/wiki/Tanenbaum%E2%80%93Torvalds_debate
http://en.wikipedia.org/wiki/History_of_Linux
the following are handy in .vimrc for use with python
" the following is probably best for my Python stuff
" Note that it leaves existing tabs characters as is.
set expandtab " enter spaces when tab is pressed
set softtabstop=4 " use 4 spaces to represent tab
set shiftwidth=4 " number of spaces to use for auto indent
set autoindent " copy indent from current line when starting a new line
then use:
>>, <<, ^D, ^T
vi -o
:sp
:vs
^Wj
^Wk
^Wl
^Wh
^W+
^W-
^W=
^W_
^W<
^W>
RMS
http://en.wikipedia.org/wiki/Editor_war
666 - vivivi
http://en.wikipedia.org/wiki/Number_of_the_Beast
ala 四
http://en.wikipedia.org/wiki/Tetraphobia
Update dojo announcement to direct folks to "community room" for rest of May.
Serbat Wangi
easter beagle
pictures of chinese power receptical and north american plug
More information about the CentralOH
mailing list