0

How to post Code in Blogger

Posted by Nantharupan on 3:45 AM
I have been searching in the internet to find a way of posting the codes in blogger. interestingly there are many ways to do that.  This post shows one way of posting the code. I will explain other ways in coming posts.

Step One : Go to https://gist.github.com/

Step Two : Enter description ( Its optional)
Step Three : Add a File Name
Step Four : Enter the code to be posted in the blogger
Step Five : Click the Create Public Gist
Step Six : Click the Embed and copy the code generated
Step Seven : Paste the code where u want to show the code. 

One example of the out come below.

var dateFormat = function () {
var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
timezoneClip = /[^-+\dA-Z]/g,
pad = function (val, len) {
val = String(val);
len = len || 2;
while (val.length < len) val = "0" + val;
return val;
};
view raw dateforamt hosted with ❤ by GitHub


0 Comments

Post a Comment

Popular posts

Copyright © 2009 On the way All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.