Skip to content

Instantly share code, notes, and snippets.

View Thunderbird_disable_updates.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Thunderbird]
"DisableAppUpdate"=dword:00000001
View synerdocs_fix
function fix_value(i,e) {
t = $(e).text();
t = t.replace(/Документ об отгрузке.+№/g, "УПД №");
$(e).text(t);
}
jQuery(".document-title>a").each(fix_value);
View gist:0037e810d8080044633e4bfc32938048
ffmpeg -i input.file -map 0:a:0 -b:a 96k output.mp3
@GodSaveEarth
GodSaveEarth / vk_extract_friends.js
Created Feb 3, 2020
Скопировать все id друзей с текущего экрана
View vk_extract_friends.js
x = document.getElementsByClassName("friends_field_title");
r = "";
for (i = 0; i < x.length; i++) {
a = x[i].getElementsByTagName("a")[0];
l = a.getAttribute("href").substr(1);
r += l + "<br>\n";
}
//console.log(r);
var myWindow=window.open(''); myWindow.document.write(r);
View fix
<script src="//cdn.jsdelivr.net/gh/ilyabirman/Likely/release/likely.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/ilyabirman/Likely/release/likely.css">
<style>
.t746__imgwrapper {
/* спиннер на время загрузки */
background: url(//cdnjs.cloudflare.com/ajax/libs/design-system/2.9.4/images/spinners/slds_spinner_brand.gif) no-repeat center;
}
.t-slds__caption__container {
text-align: center; /* центрует соцкнопки */
}
@GodSaveEarth
GodSaveEarth / add_calendars.js
Created Dec 14, 2019
Add all public calendars to your Google calendar
View add_calendars.js
// go to Add calendar -> Browse calendars of interest
// and execute in console
divs = document.querySelectorAll("div[role=checkbox][aria-checked=false]")
[].forEach.call(divs, function(div) {
div.click()
});
View strposm
function strposm($s,$a) {
foreach($a as $s1) {
if(stripos($s, $s1)!== false) return true;
}
return false;
}
View bookmarklet.js
//
console.log(123);
if(true==false) {
console.log("123"+
"asdasd");
}
View bookmarklet.js
// write your bookmarklet here