Skip to content

Instantly share code, notes, and snippets.

View vjsingh's full-sized avatar

Varun Singh vjsingh

View GitHub Profile
var ToC = "<nav role='navigation' class='table-of-contents'>" +
"<h2>Upcoming Events and Classes:</h2>" +
"<ul>";
var el, title, link;
$(".a-header").each(function() {
el = $(this);
title = el.text();
var ToC = "<div>asdf </div>";
// This is a way to "htmlDecode" the string.
//ToC = $("&lt;div />").html(ToC).text();
$(".whole-page").append(ToC);
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" MULTIPURPOSE TAB KEY
" Indent if we're at the beginning of a line. Else, do completion.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\<tab>"
else
return "\<c-p>"
void((
function(){
var t = new Date(), y = t.getFullYear(), month = t.getMonth(), month_plus = month + 1;
var parsed_day = function() { return (t.getDate() < 10 ? '0' : '') + t.getDate()};
var parsed_month = function() { return (month_plus < 10 ? '0' : '') + month_plus };
window.location.href="#report/visitors-overview/a28499152w54277021p55201311/?_.date00="+y+parsed_month()+parsed_day()+"&_.date01="+y+parsed_month()+parsed_day();}
)()
)
void function(){var a=new Date,b=a.getFullYear(),c=a.getMonth(),d=c+1;var e=function(){return(a.getDate()<10?"0":"")+a.getDate()};var f=function(){return(d<10?"0":"")+d};window.location.href="#report/visitors-overview/a28499152w54277021p55201311/?_.date00="+b+f()+e()+"&_.date01="+b+f()+e()}()