Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

customize page with another dotfile

  • Loading branch information...
commit 09304bfd946f8beee42581ca4e242dd9684c0e19 1 parent 3cc26eb
@devp devp authored
Showing with 30 additions and 20 deletions.
  1. +7 −2 README.textile
  2. +23 −18 pages/productive_page.rb
View
9 README.textile
@@ -20,9 +20,14 @@ h2. Adding more hosts to block
To create your own blocklist, create a <tt>~/.productivity_ftwrc</tt> file in your home directory. See <tt>productivity_ftwrc.sample</tt> for an example of the right format.
-h2. "Thank you"s
+h2. Overriding the productive page
+
+Not everyone likes Rick Astley! That's okay.
-<strong>productivity_ftw</strong> was created by <a href="http://blog.eizesus.com">Elad Meidar</a>, with the awesome <a href="http://github.com/bjeanes/ghost/">ghost</a> gem by <a href="http://bjeans.com">bjeans</a> and the <a href="http://gist.github.com/188861">Ruby server in one gist</a> by <a href="http://gist.github.com/h0rs3r4dish">h0rs3r4dish</a>
+Step 1: Click <a href="http://www.youtube.com/watch?v=XLsJryWc5XE">here</a> for a quick overview on the internal architecture.
+Step 2: Create a <tt>~/.productivity_ftw_page</tt> file in your home directory. See the default <tt>pages/productive_page</tt>.
+h2. "Thank you"s
+<strong>productivity_ftw</strong> was created by <a href="http://blog.eizesus.com">Elad Meidar</a>, with the awesome <a href="http://github.com/bjeanes/ghost/">ghost</a> gem by <a href="http://bjeans.com">bjeans</a> and the <a href="http://gist.github.com/188861">Ruby server in one gist</a> by <a href="http://gist.github.com/h0rs3r4dish">h0rs3r4dish</a>
View
41 pages/productive_page.rb
@@ -1,21 +1,26 @@
-page do
- set_title "Tesk Tesk Tesk"
- <<-END
- <h1 style="text-align:center; margin:0px; padding:10px; font-size:52px; background:#C00;"><script>document.write(window.location)</script> ?!</h1>
- <div style="text-align:center">
- <p style="margin:0px auto; display:block; font-size:30px; width:350px;">
- No why would you wanna go there?<br/>
- Here is something better:
- <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/NN75im_us4k&hl=en&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/NN75im_us4k&hl=en&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
- </p>
- <p tyle="margin:0px auto; display:block; width:350px;">
- <h2>Now GO BACK TO WORK!</h2>
- </p>
- </div>
- <hr/>
- <strong>productivity_ftw</strong> was created by <a href="http://blog.eizesus.com">Elad Meidar</a>, with the awesome <a href="http://github.com/bjeanes/ghost/">ghost</a> gem by <a href="http://bjeans.com">bjeans<a/> and the <a href="http://gist.github.com/188861">Ruby server in one gist</a> by <a href="http://gist.github.com/h0rs3r4dish">h0rs3r4dish</a>
+my_productive_page = "#{ENV['HOME']}/.productive_page"
+if File.exists?(my_productive_page)
+ load my_productive_page
+else
+ page do
+ set_title "Tesk Tesk Tesk"
+ <<-END
+ <h1 style="text-align:center; margin:0px; padding:10px; font-size:52px; background:#C00;"><script>document.write(window.location)</script> ?!</h1>
+ <div style="text-align:center">
+ <p style="margin:0px auto; display:block; font-size:30px; width:350px;">
+ No why would you wanna go there?<br/>
+ Here is something better:
+ <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/NN75im_us4k&hl=en&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/NN75im_us4k&hl=en&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
+ </p>
+ <p tyle="margin:0px auto; display:block; width:350px;">
+ <h2>Now GO BACK TO WORK!</h2>
+ </p>
+ </div>
+ <hr/>
+ <strong>productivity_ftw</strong> was created by <a href="http://blog.eizesus.com">Elad Meidar</a>, with the awesome <a href="http://github.com/bjeanes/ghost/">ghost</a> gem by <a href="http://bjeans.com">bjeans<a/> and the <a href="http://gist.github.com/188861">Ruby server in one gist</a> by <a href="http://gist.github.com/h0rs3r4dish">h0rs3r4dish</a>
- END
+ END
-end
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.