code

Restarting sshd on OS X

launchctl list launchctl stop com.openssh.sshd launchctl start com.openssh.sshd

wow. after editing /etc/ssh/sshd_config

squash a repo

git log > original.log

# edit original.log as desired

rm -rf .git

git init

git add .

git commit -F original.log

get rid of ‘other’ cruft in iphone, and remove iTunes dead song links

For me this time it was a bunch of voice memos that had been backed up ages ago, but somehow kept being copied in ….

MacFUSE iPhone Disk now unsupported for lion btw.

Look around with grand perspective or some file visualizer, ssh in and copy over the /Volumes/iPhoneDisk/Recordings contents as backup. I needed to delete that directory (I think). Then sync and ‘other’ was back to a reasonable size (tiny).

remove dead links

Made some fancy playlists that isolate the files with deadlinks, then delete them re-sync phone and life is good.

comment blocks in vim

This is for block editing in general, actually. Mark the area which is to be commented using the blockwise visual mode (CTRL-V).

Press I (capital i) and write the text you want to prepend to each line of the selected block, e.g. #

Critical part: Then press ESC and the text will be inserted to the left of each line of the selected block.

from: notfaq.wordpress.com/…/vim-comment-blocks-of-code

control-d is the kick back home

bearing:~ vincent$ logout

Connection to 192.168.2.3 closed.

spindle:~ vincent$ logout

Connection to 97.115.112.73 closed.

vincentc@ulaanbaatar:~$ logout

Connection to vincentcharles.com closed.

bearing:~ vincent$

I just ssh’d from this machine to my dreamhost server, then to my other machine via my dyndns domain, then from within my home network I ssh’d back into this machine.

What you see above is me exiting each session. Maybe I should try ssh’ing back to my remote machine…ad infinitum? I think, why is the real question.

A Kick: By upsetting the equilibrium of a dreamer you can wake them from a dream and return them to reality. If you’re dreaming a dream within a dream, each level of the dream has to have its own Kick in order for the one on the higher level to work. So Arthur blew up the elevator to wake them up from the snow fortress dream so they could then be woken up by the car hitting the water.

from: http://www.cinemablend.com/new/Inception-Explained-Unraveling-The-Dream-Within-The-Dream-19615.html

env EDITOR=vim crontab -e

screen commands

screen

C-a c  new screen

C-a a  toggle to previous screen

C-a ” list all window

C-a n  next or

C-a p previous screen

C-a N N means the screen number

C-a A name screen

C-a d or close shell to detach while processes continue to run

screen -r to reattach to previous session

C-a ? list

man screen

thanks http://www.kuro5hin.org/story/2004/3/9/16838/14935

C means the control key