From e50a9d8c010bc7a6213150238a50431ac5a53728 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sat, 23 Jul 2011 01:42:24 -0400 Subject: [PATCH] restored hotlinked files to head, updated post to be a draft, removed old test pages --- source/_includes/head.html | 8 +- .../2011-07-22-octopress-20-surfaces.markdown | 1 + source/test/plugins.html | 9 - source/test/syntax.html | 304 ------------------ 4 files changed, 5 insertions(+), 317 deletions(-) delete mode 100644 source/test/plugins.html delete mode 100644 source/test/syntax.html diff --git a/source/_includes/head.html b/source/_includes/head.html index 1b04754..200e0d4 100644 --- a/source/_includes/head.html +++ b/source/_includes/head.html @@ -22,11 +22,11 @@ - - + + - - + + {% include google_analytics.html %} {% include google_plus_one.html %} diff --git a/source/_posts/2011-07-22-octopress-20-surfaces.markdown b/source/_posts/2011-07-22-octopress-20-surfaces.markdown index 116033b..5d631ed 100644 --- a/source/_posts/2011-07-22-octopress-20-surfaces.markdown +++ b/source/_posts/2011-07-22-octopress-20-surfaces.markdown @@ -4,6 +4,7 @@ title: "Octopress 2.0 Surfaces" date: 2011-07-22 14:44 comments: true categories: release +published: false --- Octopress is a framework designed for Jekyll, the static blogging engine powering Github Pages. So what is Jekyll? diff --git a/source/test/plugins.html b/source/test/plugins.html deleted file mode 100644 index 73a453e..0000000 --- a/source/test/plugins.html +++ /dev/null @@ -1,9 +0,0 @@ ---- -layout: page -title: Plugins Test -date: July 18 2011 -footer: false -sidebar: false ---- - -{% figure small bird /images/bird_32_gray_fail.png Twitter Couldn't connect %} diff --git a/source/test/syntax.html b/source/test/syntax.html deleted file mode 100644 index d65d6d8..0000000 --- a/source/test/syntax.html +++ /dev/null @@ -1,304 +0,0 @@ ---- -layout: page -title: Syntax Highlighting Test -footer: false ---- - -{% include_code javascripts/test.js %} - -{% codeblock Testing html files (test.html) %} - - -A Tiny Page - - - -

abc

-

def

-

Testing page

- -{% endcodeblock %} - -{% gist 996818 %} - -

syntax_test.php

-{% highlight php %} - - -hasPermission("ManageCountries")) { ?> - - - - -
-{% endhighlight %} - - -

syntax_test.hs

-{% highlight hs %} -{-# LANGUAGE OverloadedStrings #-} -module Main where - ---import Prelude hiding (id) ---import Control.Category (id) -import Control.Arrow ((>>>), (***), arr) -import Control.Monad (forM_) --- import Data.Monoid (mempty, mconcat) - --- import System.FilePath - -import Hakyll - - -main :: IO () -main = hakyll $ do - - route "css/*" $ setExtension "css" - compile "css/*" $ byExtension (error "Not a (S)CSS file") - [ (".css", compressCssCompiler) - , (".scss", sass) - ] - - route "js/**" idRoute - compile "js/**" copyFileCompiler - - route "img/*" idRoute - compile "img/*" copyFileCompiler - - compile "templates/*" templateCompiler - - forM_ ["test.md", "index.md"] $ \page -> do - route page $ setExtension "html" - compile page $ pageCompiler - >>> applyTemplateCompiler "templates/default.html" - >>> relativizeUrlsCompiler - -sass :: Compiler Resource String -sass = getResourceString >>> unixFilter "sass" ["-s", "--scss"] - >>> arr compressCss - -{% endhighlight %} - -

syntax_test.sh

-{% highlight sh %} -#!/bin/bash - -cd $ROOT_DIR -DOT_FILES="lastpass weechat ssh Xauthority" -for dotfile in $DOT_FILES; do conform_link "$DATA_DIR/$dotfile" ".$dotfile"; done - -# TODO: refactor with suffix variables (or common cron values) - -case "$PLATFORM" in - linux) - #conform_link "$CONF_DIR/shell/zshenv" ".zshenv" - crontab -l > $ROOT_DIR/tmp/crontab-conflict-arch - cd $ROOT_DIR/$CONF_DIR/cron - if [[ "$(diff ~/tmp/crontab-conflict-arch crontab-current-arch)" == "" - ]]; - then # no difference with current backup - logger "$LOG_PREFIX: crontab live settings match stored "\ - "settings; no restore required" - rm ~/tmp/crontab-conflict-arch - else # current crontab settings in file do not match live settings - crontab $ROOT_DIR/$CONF_DIR/cron/crontab-current-arch - logger "$LOG_PREFIX: crontab stored settings conflict with "\ - "live settings; stored settings restored. "\ - "Previous settings recorded in ~/tmp/crontab-conflict-arch." - fi - ;; - -{% endhighlight %} - -

syntax_test.py

-{% highlight py %} -# test python (sample from offlineimap) - -class ExitNotifyThread(Thread): - """This class is designed to alert a "monitor" to the fact that a thread has - exited and to provide for the ability for it to find out why.""" - def run(self): - global exitthreads, profiledir - self.threadid = thread.get_ident() - try: - if not profiledir: # normal case - Thread.run(self) - else: - try: - import cProfile as profile - except ImportError: - import profile - prof = profile.Profile() - try: - prof = prof.runctx("Thread.run(self)", globals(), locals()) - except SystemExit: - pass - prof.dump_stats( \ - profiledir + "/" + str(self.threadid) + "_" + \ - self.getName() + ".prof") - except: - self.setExitCause('EXCEPTION') - if sys: - self.setExitException(sys.exc_info()[1]) - tb = traceback.format_exc() - self.setExitStackTrace(tb) - else: - self.setExitCause('NORMAL') - if not hasattr(self, 'exitmessage'): - self.setExitMessage(None) - - if exitthreads: - exitthreads.put(self, True) - - def setExitCause(self, cause): - self.exitcause = cause - def getExitCause(self): - """Returns the cause of the exit, one of: - 'EXCEPTION' -- the thread aborted because of an exception - 'NORMAL' -- normal termination.""" - return self.exitcause - def setExitException(self, exc): - self.exitexception = exc - def getExitException(self): - """If getExitCause() is 'EXCEPTION', holds the value from - sys.exc_info()[1] for this exception.""" - return self.exitexception - def setExitStackTrace(self, st): - self.exitstacktrace = st - def getExitStackTrace(self): - """If getExitCause() is 'EXCEPTION', returns a string representing - the stack trace for this exception.""" - return self.exitstacktrace - def setExitMessage(self, msg): - """Sets the exit message to be fetched by a subsequent call to - getExitMessage. This message may be any object or type except - None.""" - self.exitmessage = msg - def getExitMessage(self): - """For any exit cause, returns the message previously set by - a call to setExitMessage(), or None if there was no such message - set.""" - return self.exitmessage - -{% endhighlight %} - -

syntax_test.pl

-{% highlight perl %} -#!perl -w - -# Time-stamp: <2002/04/06, 13:12:13 (EST), maverick, csvformat.pl> -# Two pass CSV file to table formatter - -$delim = $#ARGV >= 1 ? $ARGV[1] : ','; -print STDERR "Split pattern: $delim\n"; - -# first pass -open F, "<$ARGV[0]" or die; -while() -{ - chomp; - $i = 0; - map { $max[$_->[1]] = $_->[0] if $_->[0] > ($max[$_->[1]] || 0) } - (map {[length $_, $i++]} split($delim)); -} -close F; - -print STDERR 'Field width: ', join(', ', @max), "\n"; -print STDERR join(' ', map {'-' x $_} @max); - -# second pass -open F, "<$ARGV[0]" or die; -while() - { - chomp; - $i = 0; - map { printf("%-$max[$_->[1]]s ", $_->[0]) } - (map {[$_, $i++]} split($delim)); - print "\n"; -} -close F; - -{% endhighlight %} - -

syntax_test.java

-{% highlight java %} -import java.util.Map; -import java.util.TreeSet; - -public class GetEnv { - /** - * let's test generics - * @param args the command line arguments - */ - public static void main(String[] args) { - // get a map of environment variables - Map env = System.getenv(); - // build a sorted set out of the keys and iterate - for(String k: new TreeSet(env.keySet())) { - System.out.printf("%s = %s\n", k, env.get(k)); - } - } } -{% endhighlight %} - -

syntax_test.c

-{% highlight c %} -#define UNICODE -#include - -int main(int argc, char **argv) { - int speed = 0, speed1 = 0, speed2 = 0; // 1-20 - printf("Set Mouse Speed by Maverick\n"); - - SystemParametersInfo(SPI_GETMOUSESPEED, 0, &speed, 0); - printf("Current speed: %2d\n", speed); - - if (argc == 1) return 0; - if (argc >= 2) sscanf(argv[1], "%d", &speed1); - if (argc >= 3) sscanf(argv[2], "%d", &speed2); - - if (argc == 2) // set speed to first value - speed = speed1; - else if (speed == speed1 || speed == speed2) // alternate - speed = speed1 + speed2 - speed; - else - speed = speed1; // start with first value - - SystemParametersInfo(SPI_SETMOUSESPEED, 0, speed, 0); - SystemParametersInfo(SPI_GETMOUSESPEED, 0, &speed, 0); - printf("New speed: %2d\n", speed); - return 0; -} - -{% endhighlight %} -