seen from Netherlands
seen from China

seen from Switzerland
seen from China
seen from China
seen from China

seen from Italy
seen from China
seen from China

seen from Germany

seen from Italy

seen from United States

seen from Malaysia
seen from Italy
seen from Malaysia
seen from United States

seen from Malaysia
seen from Russia
seen from Hong Kong SAR China
seen from China
Adding Syntax Highlighting to Tumblr
We developers have this obsession to write code everywhere. And seeing code as a simple plain text is very disturbing to our eyes. Turns out adding Syntax highlighting to Tumblr is pretty easy. I will be using Google Prettify here to add syntax highlighting.
First, go to your Account icon (right corner) and choose Edit Appearance
Next in the page that comes choose Edit Theme.
From the left pane, choose Edit HTML.
Inside your <head>, add the following javascript,
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?skin=sunburst"></script>
In your <body> tag, add the following, onload="prettyPrint()"
Click Update Preview and Save and you're done!
Integrating Prettify in Tumblr posts
Now that we have added the Prettify JS, we can integrate in our post easily.
Go to the HTML editor by clicking on the settings icon of your blog post
Next, nest your code between <pre class="prettyprint"> and</pre> tag.Please use a text editor and change all > to > and all < to <
#include<iostream> int main() { int i = 5; std::cout<<"hello world"; }
The dashboard view would now display a code block. Don’t fret! Select Preview on Blog option to view your Syntax highlighted changes from the dropdown next to Save draft.
Adding line numbers
If you would like to add line numbers to your code simply add the css class linenums in the <pre> tag. This would add line numbers after every 5 lines. If you want to add line numbers to every line then, add the following css code ( You can add this by giving Edit Theme then selecting Advanced Options and then adding in the Custom CSS option )
li.L0, li.L1, li.L2, li.L3, li.L5, li.L6, li.L7, li.L8 { list-style-type: decimal !important }
Further reading and reference
Google Prettify
http://snippets-of-code.tumblr.com/post/6027484416/adding-syntax-highlighting-into-tumblr
Resolved: Is there any *good* HTML-mode for emacs? #computers #it #fix
Resolved: Is there any *good* HTML-mode for emacs? #computers #it #fix
Is there any *good* HTML-mode for emacs?
I love emacs,
and I want to do my web-programming work in it, but I can’t find a way to get it to edit HTML properly.
I mean it’s seriously awful.
It will do HTML fine, but not PHP, javascript, etc.
I tried getting html-helper-mode… I downloaded it, put it in /usr/local/share/emacs/site-lisp, and added it to my .emacs file:
(autoload 'html-helper-mode…
View On WordPress
Answer: Vim highlighting for specific file types (where to put syntax files, vim events, line to put into vimrc) #dev #fix #computers
Answer: Vim highlighting for specific file types (where to put syntax files, vim events, line to put into vimrc) #dev #fix #computers
Vim highlighting for specific file types (where to put syntax files, vim events, line to put into vimrc)
I have defined a file time jak.vim to offer custom highlighting when I take notes, however it is being applied to some files that do not have the .jak extension. Specifically a file named progress.jlog. Just to test if the problem was specific to that extension I renamed progress.jlog to prog…
View On WordPress
How-to: The best syntax highlight for JSON data file in Notepad++ #it #solution #development
How-to: The best syntax highlight for JSON data file in Notepad++ #it #solution #development
The best syntax highlight for JSON data file in Notepad++
Currently my latest version of Notepad++ displays .json file as below snaphots which looks so dumped. Do you have any sysntax highlight set recommended for json data file?
In the photo, @1: key, @2: value, @3 comment should be rendered in color ^^
Answer [by Nam G VU]: The best syntax highlight for JSON data file in Notepad++
Using…
View On WordPress
Fix: How do I easily highlight the syntax of PHP code in Word? #it #solution #programming
Fix: How do I easily highlight the syntax of PHP code in Word? #it #solution #programming
How do I easily highlight the syntax of PHP code in Word?
How do I easily write and syntax-highlighted PHP code (or any others programming language) in a Word 2009 document?
Answer [by David Pearce]: How do I easily highlight the syntax of PHP code in Word?
Without manually creating character styles for each element of the language and applying them manually, you can’t.
Your best bet is to take…
View On WordPress
Fix: How to syntax highlight via Less #computers #dev #answer
Fix: How to syntax highlight via Less #computers #dev #answer
How to syntax highlight via Less
is there a way to syntax highlight a file I see in Less?
actually I’m using this command to open an xml file (and sometimes a series of them)
less htmleditors/htmleditors_config.xml
or
less [multiple files]
I’d like to stay in Less (to learn that program better and to use my knowledge of :n and :p for next/previous navigation)
But it also want some kind of…
View On WordPress
How-to: How do I get Notepad++ to associate a file type with a language? #programming #fix #dev
How-to: How do I get Notepad++ to associate a file type with a language? #programming #fix #dev
How do I get Notepad++ to associate a file type with a language?
I have associated .wxs files with Notepad++. So far so good. However, it doesn’t remember that it should use XML syntax highlighting. How do I associate a file-type with a Language?
Answer [by hamed]: How do I get Notepad++ to associate a file type with a language?
As here is mentioned : ASSOCIATE FILE EXTENSIONS WITH SPECIFIC…
View On WordPress