windhamdavid 1 year ago
parent
commit
ec27a3c348
3 changed files with 1696 additions and 23 deletions
  1. 1678 0
      inc/lib/dom.php
  2. 14 1
      inc/utils.php
  3. 4 22
      page-desk.php

File diff suppressed because it is too large
+ 1678 - 0
inc/lib/dom.php


+ 14 - 1
inc/utils.php

@@ -70,4 +70,17 @@ function _s_backbone_get_request_parameters() {
 	}
 
 	return $uri;
-}
+}
+
+function pull_til() {
+	include('lib/dom.php');
+
+	$url = 'https://davidawindham.com/til/til.html'; 
+	$html = file_get_html($url);
+	$i = 0;
+	foreach ($html->find('.markdown-section ul li ul li') as $li) {
+	    echo $li;
+		if (++$i == 13) break;	
+	}	
+}
+

+ 4 - 22
page-desk.php

@@ -57,29 +57,11 @@ get_header(); ?>
 				</div>
 				<div class="row">
 					<div class="col-xs-12 studio-tools">
-						<h5><a href="https://davidawindham.com/til/til.html">Today I Learned</a></h5>
+						<h5>Today I Learned</h5>
 						<ul>
-						<li><p>November 2017</p>
-						<ul>
-						<li><a href="host/siege-sproxy.html">Benchmarking Sites with Firefox, Siege, and Sproxy</a></li>
-						<li><a href="https://en.wikipedia.org/wiki/Disinformation" target="_blank">The Word Disinformation is a translation of a the Russian word dezinformatsiya, which is derived from KGB propaganda</a></li>
-						</ul>
-						</li>
-						<br />
-						<li><p>October 2017</p>
-						<ul>
-						<li><a href="https://en.wikipedia.org/wiki/Eliminative_materialism" target="_blank">Eliminative materialism</a></li>
-						<li><a href="https://en.wikipedia.org/wiki/List_of_pantheists" target="_blank">List of Pantheists</a></li>
-						<li><a href="https://en.wikipedia.org/wiki/Metcalfe%27s_law" target="_blank">Metcalfe&apos;s law</a></li>
-						<li><a href="https://en.wikipedia.org/wiki/Regulatory_capture" target="_blank">Regulatory Capture</a>  </li>
-						<li><a href="https://en.wikipedia.org/wiki/Charles_Harrelson" target="_blank">Woody Harrelson&apos;s Father was a hit man</a></li>
-						<li><a href="https://en.wikipedia.org/wiki/Epic_of_Gilgamesh" target="_blank">Epic of Gilgamesh</a></li>
-						<li><a href="https://www.salon.com/2017/09/16/33-13-devo-excerpt/" target="_blank">Whip It (Devo song) intended to satirize American optimism</a></li>
-						</ul>
-						</li>
-						</ul>
-
-						
+							<?php pull_til(); ?>
+							<li class="pull-right"><a href="https://davidawindham.com/til/til.html">More -></a></li>
+						</ul>	
 					</div>
 				</div>
 			</div>