Skip to content

Instantly share code, notes, and snippets.

@Quantumplation
Created December 12, 2012 19:12
Show Gist options
  • Save Quantumplation/4270651 to your computer and use it in GitHub Desktop.
Save Quantumplation/4270651 to your computer and use it in GitHub Desktop.
Gist as a blogging platform.

Gist as a blogging platform

Introduction

I've been meaning to write myself a blog for a while. As my roommate described, it would have several benefits:

  • Helps keep you organized and distills things you've learned or thought about recently.
  • Lets you offload ideas from your mind.
  • Lets you reference those ideas later.
    • Ever have that moment where you remember solving something, but don't remember how?
  • Lets you get exposure for your thoughts.

It occured to me today that Gist makes the perfect platform for blogs like these. Why?

Advantages

  • One of the major barriers to entry for writing a blog for me was finding/writing the software, configuring wordpress, or something of the sort, and then finding a cheap/free host for it and maintaining it. Gist hosts my content for me.
  • Gist supports markdown! This means I can have some pretty formatting instead of just text files.
  • I can embedd images and code as well! (No LaTeX support unfortunately)
        public static IEnumerable<T> NextPermuatation<T>(this List<T> source, Func<T, T, Boolean> comparison)
        {
            int i = source.Count - 2;
            for (; i >= 0 && comparison(source[i+1], source[i]); i--) ;
            if (i == -1)
            {
                for (int x = source.Count - 1; x >= 0; x--)
                    yield return source[x];
                yield break;
            }
            int j = source.Count - 1;
            for(; j > 0 && comparison(source[j], source[i]); j--);
            for(int x = 0; x < Math.Min(i, j); x++)
                yield return source[x];
            yield return source[Math.Max(i, j)];
            for (int x = source.Count - 1; x > Math.Max(i, j); x--)
                yield return source[x];
            yield return source[Math.Min(i, j)];
            for (int x = Math.Max(i, j) - 1; x > Math.Min(i, j); x--)
                yield return source[x];
        }
  • They're more or less permanently hosted. No need to worry about backups or harddrive failures.
  • They're written through the wonderful Ace editor.
  • They're all assosciated with my account for easy searching if I want to look up how I solved a problem before.
  • Coworkers/friends can comment with their own thoughts on the topic, and they can use markdown as well.
  • I can submit revisions if I find an error in the blog posts.
  • I/someone else can fork/clone/revise it if I have a better idea to solve the problem I'm blogging about, and related solutions are all automatically linked to eachother.

So, Here's my first entry in (hopefully) a long line of personal expositions and reflections on programming and the like.

// I can also attach sample code files
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MassiveGalaxyBattles
{
public static class Extensions
{
public static IEnumerable<T> NextPermuatation<T>(this List<T> source, Func<T, T, Boolean> comparison)
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment