Skip to content

Instantly share code, notes, and snippets.

@alpgul
alpgul / odnoklassniki.js
Created August 10, 2021 19:41
Odnoklassniki Parser
// ==UserScript==
// @name odnoklassniki
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author AlpGul
// @include *
// @grant none
// ==/UserScript==
@alpgul
alpgul / lgWebOsApps.md
Last active August 9, 2021 12:29
LG webOs Apps
Avg. Score
Image App ID App Name Category Deploy Date
@alpgul
alpgul / ffmpeg_tuts.md
Created August 3, 2021 15:31 — forked from tingplenting/ffmpeg_tuts.md
ffmpeg cli for youtube

Extract audio from a YouTube video file

ffmpeg -i INPUT.mp4 -ab 256k OUTPUT.mp3

Cut 3s length

ffmpeg -y -ss 00:00:03 -i INPUT.mp4 -codec copy OUTPUT.mp4
@alpgul
alpgul / rea_background.js
Last active May 6, 2023 00:22
Tampermonkey rea/background.js GM_screenShot
'use strict';
( t => {
const h = t.FEATURES;
t.extend( {
extension: {
onConnect: {
addListener: function ( a ) {
return chrome.runtime.onConnect.addListener( a )
}
},
@alpgul
alpgul / background.js
Last active July 22, 2021 12:39
Tampermonkey background.js GM_screenShot
! function ( e ) {
function t( n ) {
if ( r[ n ] ) return r[ n ].exports;
var s = r[ n ] = {
i: n,
l: !1,
exports: {}
};
return e[ n ].call( s.exports, s, s.exports, t ), s.l = !0, s.exports
}
@alpgul
alpgul / content.js
Last active July 22, 2021 12:39
Tampermonkey content.js GM_screenShot
! function ( e ) {
function t( o ) {
if ( n[ o ] ) return n[ o ].exports;
var s = n[ o ] = {
i: o,
l: !1,
exports: {}
};
return e[ o ].call( s.exports, s, s.exports, t ), s.l = !0, s.exports
}
@alpgul
alpgul / extension.js
Last active July 22, 2021 12:41
Tampermonkey extension.js GM_screenShot
! function ( e ) {
function t( r ) {
if ( n[ r ] ) return n[ r ].exports;
var i = n[ r ] = {
i: r,
l: !1,
exports: {}
};
return e[ r ].call( i.exports, i, i.exports, t ), i.l = !0, i.exports
}
@alpgul
alpgul / select_tags_with_text.js
Created June 8, 2019 06:07
How to select all tags with specific text content in Javascript?
function contains(selector, text) {
var elements = document.querySelectorAll(selector);
return Array.prototype.filter.call(elements, function(element){
return RegExp(text).test(element.textContent);
});
}
WebSocket.prototype._send = WebSocket.prototype.send;
WebSocket.prototype.send = function (data) {
console.log("\u2192 " + data);
this._send(data);
this.addEventListener('message', function (msg) {
console.log('\u2190 ' + msg.data);
}, false);
this.send = function (data) {
this._send(data);
console.log("\u2192 " + data);