An occasional outlet for my thoughts on life, technology, motorcycles, backpacking, kayaking, skydiving...

Wednesday, December 14, 2011

Why I'm done with facebook and you should be too

I promised to do a complete writeup on this and I'm running out of time. Let's start with an outline. 
  1. Involuntarily posting to facebook when you view an "article" or web page.
  2. Requiring me to install an "app" to view one of these "articles" that someone else [involuntarily] shared.
  3. External sites requiring me to install their facebook "app" to post comments on their site.
  4. External sites requiring me to install their facebook "app" to view comments on their site.
  5. facebook is making a move to be the only social service you use.
    1. facebook is not great at everything.
    2. We ought to be able to reward facebook with our loyalty for the services where they have earned it.
    3. We ought to be able to reward flickr with our loyalty for the service where they excel.
  6. facebook is making a move to use your friends as enforcers of their homogeneous vision.
    1. If your friend choses facebook, you must also chose facebook.
    2. If your friend is satisfied with the interface and the policies of facebook, they should be able to choose to use facebook to publish their content and consume yours.
    3. If you prefer the interface of another service, you should be able to choose to use that service to publish your content and consume your friend's.
  7. Their are hundreds of ways to consume RSS/Atom feeds.
    1. If RSS were just being invented today by facebook, you would only be able to consume it with facebook.
  8. Tim Berners-Lee had a vision for an open web.
    1. I owe my life to this vision.
    2. facebook is the antithesis of this vision.
  9. If the open web hadn't been a success; If facebook had come along instead; If AOL had won instead of falling; I would be stuck in the coal mining country of Appalachia with no industry.
These are a few of the points I'd like to cover. This is just a collection of thoughts. I wanted to get them down while they are fresh. The writeup will come. I have until January 1st, when I delete my facebook account. (Not sure how that is going to work yet. I want my facebook friends to read the article when it is complete.)

Wednesday, March 9, 2011

git Oneliners

This started out as a tweet but quickly became a collection of one-liners. Some of this may be able to be accomplished with switches to regular git commands, but I can write awk faster than I can read a man page. Sad but true.

# add files to the index which `git status` lists as untracked:
git add $(git status | awk 'p==1{print $2}; /git add /{p=1}')

# remove files from the index which `git status` lists as deleted:
git rm $(git status | awk '$2=="deleted:" && p==1{print $3}; /git add\/rm /{p=1}')

# add files to the index which `git status` lists as ``Changed but not updated``/modified:
git add $(git st | awk '$2=="modified:" && 'p==1{print $3}; /git add /{p=1}')

# checkout the penultimate commit (used for stepping backwards through commit to find the introduction of a bug)
git checkout $(git log | awk '/^commit /{if(i++>0){print $2; exit}}')
# That was my first day git user approach. Now I know to use
git checkout HEAD~1
# Yes, I know about HEAD^, but because HEAD^2, HEAD^3, etc. don't work I chose tilde notation.

# create a quick git repo with 50 commits for trying out git hackery
d=/tmp/git_hack; rm -rf $d; git init $d; cd $d; for i in {1..50}; do git log | md5 >test.txt; git add .; git commit -m "commit $i"; done >/dev/null

# rebase 1 commit out of a branch
read -p "hash? " hash; git rebase --onto $hash~1 $hash HEAD; files=$(git st -s | sed '/^UU/!d;s/^UU //'); [[ -n $files ]] && (git co --theirs $files; git add $files; git rebase --continue)

Followers