Approximate translation of the Old Russian wedding song - Ты река ль, моя реченька.
Wedding folk song (Novgorod state).
You are my river, aren't you(?)
You are so calmly running
You are my child, aren't you(?)
You are sitting and don't smiling
// Author: hinell@github.com | |
// Distributed under the MIT License | |
// Extension for CSSStyleSheet ($('style').sheet) class that enables painless manipulation of | |
// your css style sheets. | |
// Be careful! This module extendes built-in prototype! | |
// cssStyleSheet.rule(a?:number | string, i?: number): CSSRule | undefined | |
// x:number - the "x" index of cssStyleSheet.cssRules at which the CSSRule to be deleted | |
// x:string - new "x" CSSRule to add at last of the .cssRules index |
export PATH=/opt/openssh/bin:${PATH} | |
env=~/.ssh/agent.env | |
agent_is_running() { | |
if [ "$SSH_AUTH_SOCK" ]; then | |
# ssh-add returns: | |
# 0 = agent running, has keys | |
# 1 = agent running, no keys | |
# 2 = agent not running |
console.clear && console.clear(); | |
Array.prototype.each = function (fn,this_){ | |
if(this.length <=0 || fn == undefined) return; | |
let i = -1 | |
if (this_) fn = fn.bind(this_); | |
do { fn(this[i],i) } | |
while (i++ < this.length) | |
}; | |
var pow = 16 |
Approximate translation of the Old Russian wedding song - Ты река ль, моя реченька.
Wedding folk song (Novgorod state).
You are my river, aren't you(?)
You are so calmly running
You are my child, aren't you(?)
You are sitting and don't smiling
// Interface for relative cursor position calculation | |
const MouseEventX = class extends MouseEvent { | |
constructor(name, init, target){ | |
super(name, init) | |
if(target instanceof HTMLElement){ | |
let tRect = target.getBoundingClientRect(); | |
tRect.widthHalf = tRect.width / 2; | |
tRect.heigtHalf = tRect.height/ 2; | |
// Local cursor coordinates | |
let x = init.clientX - tRect.x; |
/******************** | |
Name : SC.Tracks snippet | |
Version : 0.1.2 | |
Last-Modified : 18.04.19 | |
Description : | |
The programm walks over tracks: | |
Tracks.nodes = [ | |
1track | |
2track <---- tracks.current | |
3track |
/******************** | |
Name : SC.getDonwloadLinks | |
Version : 0.1.0 | |
Last-Modified : 13.05.19 | |
Description : Snippets extracts track's urls from the page and inserts direct download link | |
**********************/ | |
console.clear(); | |
// The clientId may be gotten from http request uri | |
// Usage: urlInstance.searchParams.set(`client_id`, clientId) |
/***************************** | |
* Collect tracks v.2 | |
* Collecting tracks for the purpose of exporting them into archive | |
*/ | |
console.clear() | |
HTMLElement.prototype.$ = HTMLElement.prototype.querySelector | |
HTMLElement.prototype.$$= HTMLElement.prototype.querySelectorAll | |
NodeList.prototype.map = Array.prototype.map; | |
String.prototype.contains = function(str){ return new RegExp(str).test(this) } |
document.documentElement.style.height = | |
document.documentElement.style.width = | |
document.body.style.height = | |
document.body.style.width = "100%" | |
canvas = document.createElement(`canvas`); | |
canvas.canvasRes = function (){ | |
var {width, height} = document.body.getBoundingClientRect(); | |
var d = document.body.getBoundingClientRect(); | |
canvas = this; |
function bench (name, iterations = 500, fn) { | |
const t0 = performance.now(); | |
for (let i = 0; i < iterations; i++) fn(i) | |
let d = performance.now() - t0; | |
d = Math.ceil(d); | |
let ops = iterations / d; |