SaGuN's Blog

#Developer #Robotics #Engineer #Hacker

Code Plugins

Here are the plugins for dealing with code.

Markdown:

var blogFramework = "Octopress";

Backtick method:

With Syntax HighlightingView in Github
1
2
3
4
5
6
var blogFramework = "Octopress";
// A sample function to output bold
var makeStrongFunc = function(str) {
    if(typeof str === "undefined") str = "nothing";
    return "<strong>" + str + "</strong>";
}
Codeblock MethodGithub
1
2
3
4
5
6
var blogFramework = "Octopress";
// A sample function to output bold
var makeStrongFunc = function(str) {
    if(typeof str === "undefined") str = "nothing";
    return "<strong>" + str + "</strong>";
}

Include Code:

Fibonacci Sequence (fib.js) download
1
2
3
4
5
6
7
8
// Start Fibonacci Generator function
function fib(n) {
  if (n <= 1) {
      return 1;
  }
  return fib(n-2) + fib(n-1);
}
// End Fibonacci Generator function

Gist:

JSFiddle

Comments