converting to github-pages

This commit is contained in:
James Walker 2016-10-23 22:09:51 -04:00
parent 00df61134d
commit 0392180886
Signed by: walkah
GPG Key ID: 3C127179D6086E93
11 changed files with 94 additions and 257 deletions

View File

@ -1 +1 @@
2.3.0 2.3.1

View File

@ -1,10 +1,7 @@
source 'http://rubygems.org' source 'http://rubygems.org'
gem 'octopress', '~> 3.0.0' gem 'github-pages', group: :jekyll_plugins
gem 'narray', git: 'https://github.com/tonyarnold/narray'
gem 'gsl', git: 'https://github.com/tonyarnold/rb-gsl'
gem 'html-proofer' gem 'html-proofer'
gem 'bourbon' gem 'bourbon'
gem 'neat' gem 'neat'

View File

@ -1,16 +1,3 @@
GIT
remote: https://github.com/tonyarnold/narray
revision: eeb06b030320a222727e41f11a2f0be300f9dd52
specs:
narray (0.6.0.8)
GIT
remote: https://github.com/tonyarnold/rb-gsl
revision: 659a95fd9b610c02e38035b956feceb5c29e1ecb
specs:
gsl (1.14.7)
narray (>= 0.5.9)
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
@ -24,11 +11,48 @@ GEM
bourbon (4.2.6) bourbon (4.2.6)
sass (~> 3.4) sass (~> 3.4)
thor (~> 0.19) thor (~> 0.19)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
colorator (0.1) colorator (0.1)
colored (1.2) colored (1.2)
ethon (0.8.0) ethon (0.8.0)
ffi (>= 1.3.0) ffi (>= 1.3.0)
execjs (2.7.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
ffi (1.9.10) ffi (1.9.10)
gemoji (2.1.0)
github-pages (87)
github-pages-health-check (= 1.1.0)
jekyll (= 3.1.6)
jekyll-coffeescript (= 1.0.1)
jekyll-feed (= 0.5.1)
jekyll-gist (= 1.4.0)
jekyll-github-metadata (= 2.0.2)
jekyll-mentions (= 1.1.3)
jekyll-paginate (= 1.1.0)
jekyll-redirect-from (= 0.11.0)
jekyll-sass-converter (= 1.3.0)
jekyll-seo-tag (= 2.0.0)
jekyll-sitemap (= 0.10.0)
jemoji (= 0.6.2)
kramdown (= 1.11.1)
liquid (= 3.0.6)
listen (= 3.0.6)
mercenary (~> 0.3)
rouge (= 1.11.1)
terminal-table (~> 1.4)
github-pages-health-check (1.1.0)
addressable (~> 2.3)
net-dns (~> 0.8)
octokit (~> 4.0)
public_suffix (~> 1.4)
typhoeus (~> 0.7)
html-pipeline (2.4.2)
activesupport (>= 2)
nokogiri (>= 1.4)
html-proofer (2.6.1) html-proofer (2.6.1)
activesupport (~> 4.2) activesupport (~> 4.2)
addressable (~> 2.3) addressable (~> 2.3)
@ -39,7 +63,7 @@ GEM
typhoeus (~> 0.7) typhoeus (~> 0.7)
yell (~> 2.0) yell (~> 2.0)
i18n (0.7.0) i18n (0.7.0)
jekyll (3.0.1) jekyll (3.1.6)
colorator (~> 0.1) colorator (~> 0.1)
jekyll-sass-converter (~> 1.0) jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1) jekyll-watch (~> 1.1)
@ -48,53 +72,69 @@ GEM
mercenary (~> 0.3.3) mercenary (~> 0.3.3)
rouge (~> 1.7) rouge (~> 1.7)
safe_yaml (~> 1.0) safe_yaml (~> 1.0)
jekyll-sass-converter (1.4.0) jekyll-coffeescript (1.0.1)
sass (~> 3.4) coffee-script (~> 2.2)
jekyll-watch (1.3.0) jekyll-feed (0.5.1)
listen (~> 3.0) jekyll-gist (1.4.0)
octokit (~> 4.2)
jekyll-github-metadata (2.0.2)
jekyll (~> 3.1)
octokit (~> 4.0)
jekyll-mentions (1.1.3)
html-pipeline (~> 2.3)
jekyll (~> 3.0)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.11.0)
jekyll (>= 2.0)
jekyll-sass-converter (1.3.0)
sass (~> 3.2)
jekyll-seo-tag (2.0.0)
jekyll (~> 3.1)
jekyll-sitemap (0.10.0)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
jemoji (0.6.2)
gemoji (~> 2.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0)
json (1.8.3) json (1.8.3)
kramdown (1.9.0) kramdown (1.11.1)
liquid (3.0.6) liquid (3.0.6)
listen (3.0.5) listen (3.0.6)
rb-fsevent (>= 0.9.3) rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9) rb-inotify (>= 0.9.7)
mercenary (0.3.5) mercenary (0.3.5)
mini_portile2 (2.0.0) mini_portile2 (2.0.0)
minitest (5.8.3) minitest (5.8.3)
multipart-post (2.0.0)
neat (1.7.2) neat (1.7.2)
bourbon (>= 4.0) bourbon (>= 4.0)
sass (>= 3.3) sass (>= 3.3)
net-dns (0.8.0)
nokogiri (1.6.7.1) nokogiri (1.6.7.1)
mini_portile2 (~> 2.0.0.rc2) mini_portile2 (~> 2.0.0.rc2)
octopress (3.0.11) octokit (4.4.0)
jekyll (>= 2.0) sawyer (~> 0.7.0, >= 0.5.3)
mercenary (~> 0.3.2)
octopress-deploy
octopress-escape-code (~> 2.0)
octopress-hooks (~> 2.0)
redcarpet (~> 3.0)
titlecase
octopress-deploy (1.3.0)
colorator
octopress-escape-code (2.1.1)
jekyll (~> 3.0)
octopress-hooks (2.6.1)
jekyll (>= 2.0)
parallel (1.6.1) parallel (1.6.1)
public_suffix (1.5.3)
rb-fsevent (0.9.7) rb-fsevent (0.9.7)
rb-inotify (0.9.5) rb-inotify (0.9.7)
ffi (>= 0.5.0) ffi (>= 0.5.0)
redcarpet (3.3.4) rouge (1.11.1)
rouge (1.10.1)
safe_yaml (1.0.4) safe_yaml (1.0.4)
sass (3.4.20) sass (3.4.20)
sawyer (0.7.0)
addressable (>= 2.3.5, < 2.5)
faraday (~> 0.8, < 0.10)
terminal-table (1.7.3)
unicode-display_width (~> 1.1.1)
thor (0.19.1) thor (0.19.1)
thread_safe (0.3.5) thread_safe (0.3.5)
titlecase (0.1.1)
typhoeus (0.8.0) typhoeus (0.8.0)
ethon (>= 0.8.0) ethon (>= 0.8.0)
tzinfo (1.2.2) tzinfo (1.2.2)
thread_safe (~> 0.1) thread_safe (~> 0.1)
unicode-display_width (1.1.1)
yell (2.0.5) yell (2.0.5)
PLATFORMS PLATFORMS
@ -102,11 +142,9 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
bourbon bourbon
gsl! github-pages
html-proofer html-proofer
narray!
neat neat
octopress (~> 3.0.0)
BUNDLED WITH BUNDLED WITH
1.11.2 1.13.2

View File

@ -3,14 +3,12 @@ author: James Walker
description: "James Walker is an independent developer and hacker" description: "James Walker is an independent developer and hacker"
url: http://walkah.net url: http://walkah.net
lsi: true markdown: kramdown
markdown: redcarpet
permalink: blog/:title/ permalink: blog/:title/
exclude: [Gemfile, Gemfile.lock, vendor] exclude: [Gemfile, Gemfile.lock, vendor]
gems: [bourbon, neat] gems: [bourbon, neat]
sass: sass:
style: compressed style: compressed
# octopress settings gems:
post_ext: md - jekyll-gist
page_ext: html

View File

@ -1,5 +1,5 @@
<div class="vcard"> <div class="vcard">
<img src="http://www.gravatar.com/avatar/b29b5419f81fa03145cafc684bb20c76.png?s=75" class="photo left" alt="James Walker" > <img src="http://www.gravatar.com/avatar/b29b5419f81fa03145cafc684bb20c76.png?s=75" class="photo left" alt="James Walker" >
<p><a href="/about.html" class="fn n">James Walker</a> (a.k.a. <a href="http://walkah.net/" rel="me" class="url nickname uid">walkah</a>) is an independent developer and hacker. He is a long time <a href="http://drupal.org/user/1531" rel="me">Drupal</a> developer, but these days spends more time in Python, Ruby and Javascript.</p> <p><a href="/about" class="fn n">James Walker</a> (a.k.a. <a href="http://walkah.net/" rel="me" class="url nickname uid">walkah</a>) is an independent developer and hacker. He is a long time <a href="http://drupal.org/user/1531" rel="me">Drupal</a> developer, but these days spends more time in Python, Ruby and Javascript.</p>
<p>You can follow him on <a href="https://twitter.com/walkah" rel="me">twitter</a> or <a href="https://github.com/walkah">github</a>.</p> <p>You can follow him on <a href="https://twitter.com/walkah" rel="me">twitter</a> or <a href="https://github.com/walkah">github</a>.</p>
</div> </div>

View File

@ -19,9 +19,9 @@
</header> </header>
<nav role="navigation"> <nav role="navigation">
<ul class="navigation"> <ul class="navigation">
<li><a href="/about.html">About</a></li> <li><a href="/about">About</a></li>
<li><a href="/blog/">Blog</a></li> <li><a href="/blog/">Blog</a></li>
<li><a href="/contact.html">Contact</a></li> <li><a href="/contact">Contact</a></li>
<li><a href="/atom.xml">Feed <i class="fa fa-rss"></i></a></li> <li><a href="/atom.xml">Feed <i class="fa fa-rss"></i></a></li>
</ul> </ul>
</nav> </nav>

View File

@ -1,100 +0,0 @@
# A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers.
# by: Brandon Tilly
# Source URL: https://gist.github.com/1027674
# Post http://brandontilley.com/2011/01/31/gist-tag-for-jekyll.html
#
# Example usage: {% gist 1027674 gist_tag.rb %} //embeds a gist for this plugin
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
super
@text = text
@cache_disabled = false
@cache_folder = File.expand_path "../.gist-cache", File.dirname(__FILE__)
FileUtils.mkdir_p @cache_folder
end
def render(context)
if parts = @text.match(/([\d]*) (.*)/)
gist, file = parts[1].strip, parts[2].strip
script_url = script_url_for gist, file
code = get_cached_gist(gist, file) || get_gist_from_web(gist, file)
html_output_for script_url, code
else
""
end
end
def html_output_for(script_url, code)
code = CGI.escapeHTML code
<<-HTML
<div><script src='#{script_url}'></script>
<noscript><pre><code>#{code}</code></pre></noscript></div>
HTML
end
def script_url_for(gist_id, filename)
"https://gist.github.com/#{gist_id}.js?file=#{filename}"
end
def get_gist_url_for(gist, file)
"https://raw.github.com/gist/#{gist}/#{file}"
end
def cache(gist, file, data)
cache_file = get_cache_file_for gist, file
File.open(cache_file, "w") do |io|
io.write data
end
end
def get_cached_gist(gist, file)
return nil if @cache_disabled
cache_file = get_cache_file_for gist, file
File.read cache_file if File.exist? cache_file
end
def get_cache_file_for(gist, file)
bad_chars = /[^a-zA-Z0-9\-_.]/
gist = gist.gsub bad_chars, ''
file = file.gsub bad_chars, ''
md5 = Digest::MD5.hexdigest "#{gist}-#{file}"
File.join @cache_folder, "#{gist}-#{file}-#{md5}.cache"
end
def get_gist_from_web(gist, file)
gist_url = get_gist_url_for gist, file
raw_uri = URI.parse gist_url
proxy = ENV['http_proxy']
if proxy
proxy_uri = URI.parse(proxy)
https = Net::HTTP::Proxy(proxy_uri.host, proxy_uri.port).new raw_uri.host, raw_uri.port
else
https = Net::HTTP.new raw_uri.host, raw_uri.port
end
https.use_ssl = true
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new raw_uri.request_uri
data = https.request request
data = data.body
cache gist, file, data unless @cache_disabled
data
end
end
class GistTagNoCache < GistTag
def initialize(tag_name, text, token)
super
@cache_disabled = true
end
end
end
Liquid::Template.register_tag('gist', Jekyll::GistTag)
Liquid::Template.register_tag('gistnocache', Jekyll::GistTagNoCache)

View File

@ -1,92 +0,0 @@
module Jekyll
class TagIndex < Page
def initialize(site, base, dir, tag)
@site = site
@base = base
@dir = dir
@name = 'index.html'
self.process(@name)
self.read_yaml(File.join(base, '_layouts'), 'tag_index.html')
self.data['tag'] = tag
tag_title_prefix = site.config['tag_title_prefix'] || 'Posts Tagged &ldquo;'
tag_title_suffix = site.config['tag_title_suffix'] || '&rdquo;'
self.data['title'] = "#{tag_title_prefix}#{tag}#{tag_title_suffix}"
end
end
class TagFeed < Page
def initialize(site, base, tag_dir, tag)
@site = site
@base = base
@dir = tag_dir
@name = 'atom.xml'
self.process(@name)
# Read the YAML data from the layout page.
self.read_yaml(File.join(base, '_layouts'), 'tag_feed.xml')
self.data['tag'] = tag
# Set the title for this page.
tag_title_prefix = site.config['tag_title_prefix'] || 'Posts Tagged &ldquo;'
tag_title_suffix = site.config['tag_title_suffix'] || '&rdquo;'
self.data['title'] = "#{tag_title_prefix}#{tag}#{tag_title_suffix}"
# Set the meta-description for this page.
# Set the correct feed URL.
self.data['feed_url'] = "#{tag_dir}/#{name}"
end
end
class TagGenerator < Generator
safe true
def generate(site)
if site.layouts.key? 'tag_index'
dir = site.config['tag_dir'] || 'tag'
site.tags.keys.each do |tag|
dest_dir = File.join(dir, tag.gsub(/ /, '-'))
write_tag_index(site, dest_dir, tag)
write_tag_feed(site, dest_dir, tag)
end
end
end
def write_tag_index(site, dir, tag)
index = TagIndex.new(site, site.source, dir, tag)
index.render(site.layouts, site.site_payload)
index.write(site.dest)
site.pages << index
end
def write_tag_feed(site, dir, tag)
feed = TagFeed.new(site, site.source, dir, tag)
feed.render(site.layouts, site.site_payload)
feed.write(site.dest)
site.pages << feed
end
end
# Adds some extra filters used during the category creation process.
module Filters
# Outputs a list of categories as comma-separated <a> links. This is used
# to output the category list for each post on a category page.
#
# +categories+ is the list of categories to format.
#
# Returns string
#
def tag_links(tags)
tags = tags.sort!.map do |item|
item.gsub!(/ /, '-')
"<a class='tag' href='/tag/#{item}/'>#{item}</a>"
end
case tags.length
when 0
""
when 1
tags[0].to_s
else
"#{tags[0...-1].join(', ')}, #{tags[-1]}"
end
end
end
end

View File

@ -11,5 +11,3 @@ tags:
so, i've finally set mine up and gone through <a href="http://www.3rdmoon.com/crusso/audrey/initialsetup/updateaudrey.htm">these instructions</a> to get a root shell. let the hacking begin! so, i've finally set mine up and gone through <a href="http://www.3rdmoon.com/crusso/audrey/initialsetup/updateaudrey.htm">these instructions</a> to get a root shell. let the hacking begin!
my first task, is that i wanted to use audrey as a digital photo frame - i.e. have it rotate through a bunch of my digital images (stored on my fileserver). after some digging (and disappointment that many projects seem to have disappeared), i came across <a href="http://bloodyeck.com/projects/audrey/">this site</a>. after some struggling with it (thanks for your help alex!) i managed to get it working the way i wanted. you can almost see the results in the attached photo. my first task, is that i wanted to use audrey as a digital photo frame - i.e. have it rotate through a bunch of my digital images (stored on my fileserver). after some digging (and disappointment that many projects seem to have disappeared), i came across <a href="http://bloodyeck.com/projects/audrey/">this site</a>. after some struggling with it (thanks for your help alex!) i managed to get it working the way i wanted. you can almost see the results in the attached photo.
i'll continue to log any further hacks <a href="/tag/audrey/">here</a>.

View File

@ -5,20 +5,18 @@ tags:
- drupal - drupal
--- ---
Like many kind, good-natured geeks, I (yes, I was talking about me) host a number of small sites for friends. Many of those sites run Drupal and several don't get a lot of attention. That is, until spammers find their way around [Mollom](http://mollom.com/). I've seen this happen a few times, but most recently on a Drupal 7 site. In this particular case, the spam comments had been trickling in over a few weeks undetected. Following a burst of recent activity (enough to notice via monitoring), I checked in to find > 60,000 spam comments. Like many kind, good-natured geeks, I (yes, I was talking about me) host a number of small sites for friends. Many of those sites run Drupal and several don't get a lot of attention. That is, until spammers find their way around [Mollom](http://mollom.com/). I've seen this happen a few times, but most recently on a Drupal 7 site. In this particular case, the spam comments had been trickling in over a few weeks undetected. Following a burst of recent activity (enough to notice via monitoring), I checked in to find > 60,000 spam comments.
If this has ever happened to you: you're not alone. At this number of comments, using Drupal's interface (50 comments at a time) isn't really usable. Also, these things tend to happen in bursts - so chances are good there's a block of comments that are all spam (i.e. there haven't been any legitimate comments that you want to save since it started). So, I whipped up a small script here: If this has ever happened to you: you're not alone. At this number of comments, using Drupal's interface (50 comments at a time) isn't really usable. Also, these things tend to happen in bursts - so chances are good there's a block of comments that are all spam (i.e. there haven't been any legitimate comments that you want to save since it started). So, I whipped up a small script here:
{% gist 2379996 %} {% gist walkah/2379996 %}
Here's how to use it: Here's how to use it:
1. Place the code in a file (say, `comment-rm.php`) in your Drupal directory. 1. Place the code in a file (say, `comment-rm.php`) in your Drupal directory.
2. Find the `cid` of the first spam comment (exercise left to the reader) and set `$first_comment` to that value. 2. Find the `cid` of the first spam comment (exercise left to the reader) and set `$first_comment` to that value.
3. Run `drush scr comment-rm.php` and go grab a coffee. 3. Run `drush scr comment-rm.php` and go grab a coffee.
Hope that helps someone, but at least now I can find it again next time. Hope that helps someone, but at least now I can find it again next time.
*Beware*: This deletes comments forever, be careful. *Beware*: This deletes comments forever, be careful.

View File

@ -1,4 +1,4 @@
@import "bourbon"; @import "bourbon/bourbon";
@font-face { @font-face {
font-family: Typewriter; font-family: Typewriter;
@ -21,6 +21,6 @@ $gutter: 1em;
//$visual-grid: true; //$visual-grid: true;
@import "neat"; @import "neat/neat";
$mobile: new-breakpoint(max-width 500px 4); $mobile: new-breakpoint(max-width 500px 4);