Skip to content

Instantly share code, notes, and snippets.

Mikhail Kuznetcov shershen08

Block or report user

Report or block shershen08

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View grid line snippet
// Movable grid line
// ------------------
// remove on dblclick, several lines possible
.css({"position":"absolute","width": 1,"height":jQuery('body').css('height'),"background":"#f00","left":30,"z-index":10000, 'cursor':'pointer'})
.dblclick(function() {jQuery(this).remove();})
var lineId = (new Date()).getTime().toString().substr(8);
jQuery(this).addClass('grid-line').attr('id', 'grid'+lineId).css({"width": 2});
shershen08 / gist:edab3da7a932f6f94741
Created Jan 22, 2015
console parsing of page Книжный топ–лист D3
View gist:edab3da7a932f6f94741
//for page
var allNodes = document.querySelectorAll('.c_body b'), result = [];
function getBooksWithRating(item,i) {
var newItem = {}, rate;
newItem.text = item.innerHTML;
rate = item.parentNode.parentNode.querySelectorAll('.vote_result')[0] ? item.parentNode.parentNode.querySelectorAll('.vote_result')[0].innerHTML : 0;
newItem.rating = rate;
if(rate > 30){
View gist:230de56763a75a7daabf
shershen08 / cli-rss-reader.js
Created Mar 5, 2016
A simple RSS Reader with Readline in NodeJS
View cli-rss-reader.js
Readline module is used to read and write data in console.
Full docs on Readline - https: //
In this example the list of RSS channes from - https: //
To call the script you should use type: 'node --harmony cmd.js'
// Adding needed modules:
// readline - reads console ine
// request - does http resquests
shershen08 / angular-masonry-deps.js
Created May 6, 2016
Single module for including all angular-masonry dependences via AMD
View angular-masonry-deps.js
* Single module for including angular-masonry via AMD (e.g. RequireJS)
* includes: Bridget, matchesSelector, EvEmitter, Fizzy UI utils, getSize, imagesLoaded, Outlayer, Outlayer Item, Masonry
* Created at: 6-05-2016
* Created by:
define(['jquery'], function($) {
shershen08 / fb-login.js
Created May 14, 2016
fb login boilerpale
View fb-login.js
// This is called with the results from from FB.getLoginStatus().
function statusChangeCallback(response) {
// The response object is returned with a status field that lets the
// app know the current login status of the person.
// Full docs on the response object can be found in the documentation
// for FB.getLoginStatus().
if (response.status === 'connected') {
You can’t perform that action at this time.