Skip to content

Instantly share code, notes, and snippets.

View AshokEmrys's full-sized avatar

Ashok Emrys AshokEmrys

View GitHub Profile
call NERDTreeAddKeyMap({'key': 't', 'callback': 'NERDTreeMyOpenInTab', 'scope': 'FileNode', 'override': 1 })
function NERDTreeMyOpenInTab(node)
call a:node.open({'reuse': "all", 'where': 't'})
endfunction
@budparr
budparr / jekyll-collections-prev-next.html
Last active September 29, 2021 10:55
Previous Next Links for Jekyll Collections
{% capture the_collection %}{{page.collection}}{% endcapture %}
{% if page.collection %}
{% assign document = site[the_collection] %}
{% endif %}
<h1>TITLE: {{ page.title }}</h1>
{% for links in document %}
{% if links.title == page.title %}
{% unless forloop.first %}
{% assign prevurl = prev.url %}
{% endunless %}
@decklord
decklord / header.html
Last active December 22, 2015 21:19
Code snippet for syntax highlight in Tumblr
<!-- Base For Syntax Highlight -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css"></link>
<!-- Loads a nice template for syntax highlight -->
<!-- Get more templates on: http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html -->
<link rel="stylesheet" type="text/css" href="https://google-code-prettify.googlecode.com/svn/trunk/styles/sons-of-obsidian.css"></link>
<script type="text/javascript">
@benizi
benizi / simpler
Created November 30, 2012 05:26 — forked from justinabrahms/colortest.py
Show how different terminals show bold colors
#!/bin/sh
# Print four lines showing blocks of colors: 0-7 | 0-7bold | 8-15 | 8-15bold
perl -CADS -lwe '
my $block = shift || (chr(0x2588) x 3);
for (["", 0], ["1;", 0], ["", 8], ["1;", 8]) {
my ($bold, $offset) = @$_;
my @range = map $offset + $_, 0..7;
printf "%s %-6s ", $bold ? "bold" : "norm", "$range[0]-$range[-1]";
print map("\e[${bold}38;5;${_}m$block", @range), "\e[0m"
}