Ozon: apply all promo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin | |
""" Format text as table | |
""" | |
class AlignerCommand(sublime_plugin.TextCommand): | |
""" Split text by delimeter and format as table with limited width | |
@param 'limit': int - Max width of table, default is 80 | |
@param 'splitter': str - Custom delimeter, default is ', ' | |
@param 'after': bool - Delimeter position, default is False (before) | |
@param 'expand': int - Additional space between text and delimeter, default 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ var v = document.getElementsByTagName("video")[0]; var newRate = prompt("New Speed", v.playbackRate); if(newRate) v.playbackRate = newRate; })() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Summarize file sizes in the current directory | |
Name Count Size, Mb | |
---- ----- -------- | |
.CR2 18043 422,723 | |
.jpg 125904 284,799 | |
.img 7 238,507 | |
.mp4 1105 86,354 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
- Open https://www.linkedin.com/mynetwork/invitation-manager/ | |
- Open a Developer console | |
- Paste code below | |
- Run it :) | |
*/ | |
document.querySelectorAll('.invitation-card__action-btn') | |
.forEach(n => n.innerText == 'Accept' && n.click()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Open https://www.pochta.ru/tracking | |
// Paste to Developer console | |
// Run | |
for (node of $$('[class ^= "UpdateStatus"]')) { | |
node.click(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Paste in the developer's console | |
*/ | |
var i = 0; | |
function scroll(){ | |
var scrollingElement = (document.scrollingElement || document.body); | |
scrollingElement.scrollTop = scrollingElement.scrollHeight; | |
console.log('Scroll', i++); | |
} |
To prepare an article to habr.com publishing use following rules:
-
Start an artile with H1 header:
# Самые талантливые программисты на `sed` в 2020 году # ...
-
Follow the article header with special quotes for the Tags, Hubs and optional Tutorial mark:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$$('h2,h3').forEach(el => { | |
if (el.hasAttribute('id')) { | |
console.log(`- [${el.innerText}](#${el.id})`); | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ctrl+Shift+C to open Chrome Console. | |
// Choose an IFrame of the Vimeo Video with a comment `player.vimeo.com` | |
// in the drop-down list `top`. | |
// Run a script: | |
var videos = []; | |
$$('script')[3].textContent.match(/\{[^{]+?mp4[^}]+?\}/g).forEach( | |
x => { o = JSON.parse(x); | |
videos.push(o);}); | |
videos.sort((a, b) => a.quality.localeCompare(b.quality)).forEach( |
NewerOlder