Skip to content

Instantly share code, notes, and snippets.

View mykola-radionov's full-sized avatar

Mykola Radionov mykola-radionov

View GitHub Profile
@mykola-radionov
mykola-radionov / expand_all_comments.js
Created October 29, 2018 12:46
Since Github wiped out jQuery I needed to rewrite bookmarklet to expand all outdated PR comments. How to use: just add it to the bookmarks tab as a separate bookmark with this code as its URL.
javascript:(function() {
document.querySelectorAll(".outdated-comment").forEach(
function (node) {
node.querySelector(".show-outdated-button").click();
}
)
}());
Uncaught TypeError: Cannot read property 'Zt' of undefined
at C5a (/calendar/_/scs/calendar-static/_/js/k=calendar.cal.en.6pHV8h2RLLE.O/m=gadget,eventform,detailssettings/rt=j/d=0/rs=ANwU0p4EO8TIySujCJzurICw4yW4Z-GERw:1235:95)
at S5a (/calendar/_/scs/calendar-static/_/js/k=calendar.cal.en.6pHV8h2RLLE.O/m=gadget,eventform,detailssettings/rt=j/d=0/rs=ANwU0p4EO8TIySujCJzurICw4yW4Z-GERw:1205:225)
at https://calendar.google.com/calendar/_/scs/calendar-static/_/js/k=calendar.cal.en.6pHV8h2RLLE.O/m=doozer/rt=j/d=1/rs=ANwU0p4EO8TIySujCJzurICw4yW4Z-GERw:16:110
at qs.us (https://calendar.google.com/calendar/_/scs/calendar-static/_/js/k=calendar.cal.en.6pHV8h2RLLE.O/m=doozer/rt=j/d=1/rs=ANwU0p4EO8TIySujCJzurICw4yW4Z-GERw:506:564)
at qs.Oq (https://calendar.google.com/calendar/_/scs/calendar-static/_/js/k=calendar.cal.en.6pHV8h2RLLE.O/m=doozer/rt=j/d=1/rs=ANwU0p4EO8TIySujCJzurICw4yW4Z-GERw:16:110)
at qs.H (https://calendar.google.com/calendar/_/scs/calendar-static/_/js/k=calendar.cal.en.6pHV8h2RLL
@mykola-radionov
mykola-radionov / uri.js
Created July 24, 2017 14:53 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@mykola-radionov
mykola-radionov / expand_outdated_comments.js
Last active June 27, 2017 13:37
See all outdated comments in the body of pull-request on GitHub
// Add it to bookmarks and then click to see all outdated comments in the body of pull-request on GitHub:
javascript:Array.from(document.getElementsByClassName('outdated-comment')).forEach(l => l.classList.add('open'));
// Or copy it into address bar and replace "@" first char, hit Enter (without this char due to security reasons
// your browser will remove "javascript:" prefix and then you have to type it manually):
@javascript:Array.from(document.getElementsByClassName('outdated-comment')).forEach(l => l.classList.add('open'));
// In case this piece of code stopped to work recheck spelling of class name with page's source code. It happens,
// this name was changed before few times.
set t_Co=256
"========================================
" Vundle setting
"========================================
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmqrik/Vundle.vim'