Showing posts with label post. Show all posts
Showing posts with label post. Show all posts

2015-01-18

Level Up - Blogger: How to add formatted code to post (with highlighting)

In many of my posts, I like to add code snippets. Blogger doesn't have good native support for displaying code with syntax and line highlighting, so I found a way to add that feature using GitHub Gists and gist-embed project on GitHub.

The following steps can mostly be used with any blog.

Step 1: Include jQuery and gist-embed within your header tags.

<head>
  ...
  <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/gist-embed/2.0/gist-embed.min.js"></script>
</head>


Step 2: Add a code element to where you want your Gist code to appear.

<code data-gist-id=""></code>


Example:



Source:
<code data-gist-file="PrimeNumbers.cppdata-gist-hide-footer="true"
   data-gist-highlight-line="9,12,35-42" data-gist-id="5789439"></code>


Nice features also included, but not shown above:

  • Ability to show GitHub footer
  • Remove line numbers
  • Load multiple files from a Gist
  • Load a signal file from a Gist
  • Show only certain lines from a file


This article was mainly written for myself in the future, but I hope others can benefit from it, as well.

Links:



~ Danial Goodwin ~



2013-07-14

Cleanliness: Grass versus Concrete

Is laying on grass more sanitary than laying on concrete?

Concrete may be easier to wash off the surface (via rain) and grass/ground may more easily absorb things on it.

Regardless, people [mostly] rather lay on random grass than lay on random concrete.

~ Simply Advanced ~

ps - I had another sentence that stated my conclusion, but my posts are [typically] different from other blogs. For other blogs, you can just read them and say "okay", then move on. For many of my posts, they just state a few things or a new perspective and I leave the ability to further expand the readers mind up to the reader. I know many people want quick wins, but in the long run people (IMHO) need to be able think for themselves and always be doing so.



2013-04-04

Acquired Savants

Another quote from the March 2013 issue of the great Popular Science magazine.
Acquired savants are perfect fodder for a society obsessed with self-improvement, reality television, and pop psychology.
You may draw your own conclusions by considering this to be a neutral post, just here for the spreading of some different perspectives.

~ Simply Advanced ~



2013-01-08

New Years Resolution of 2013

This is the first year that I'm going to create a blog post about my New Years Resolution.

  • My main goal for this year is to create at least one truly innovative mobile application.
  • Also for this year would be to develop at least two half-innovative apps.
  • This year will be the one where I do more hand stands and possibly a vertical push-up!

LTE Discovery was my main innovative app of 2012. If you search Google for "LTE Discovery", then it should be the first link that pops up. After three weeks of being on Google Play, LTE Discovery is still a one-of-a-kind app. =]

~ Simply Advanced ~

UPDATE: Added hand stands as goal.



2012-11-15

New Quora Post - Happiness

In the weekly email I get from Quora (a great Q&A forum, possibly the best), I decided to answer one of the questions posed, "To be happier, what's the smallest, simplest thing an average person could do?"

Let me know your thoughts too.

http://qr.ae/18SbT

~ Simply Advanced ~