Skip to content

Instantly share code, notes, and snippets.

@alpgul
alpgul / debugMsg.ahk
Created September 13, 2022 05:31
AHK Debug Message
DebugMessage(str)
{
global h_stdout
DebugConsoleInitialize() ; start console window if not yet started
str .= "`n" ; add line feed
DllCall("WriteFile", "uint", h_Stdout, "uint", &str, "uint", StrLen(str), "uint*", BytesWritten, "uint", NULL) ; write into the console
WinSet, Bottom,, ahk_id %h_stout% ; keep console on bottom
}
DebugConsoleInitialize()
@alpgul
alpgul / main.c
Last active March 24, 2022 15:34
WebAssembly Set/Get String - https://wasdk.github.io/WasmFiddle/
char a[20];
void setA(char b){
*a=b;
}
char getA(){
return *a;
}
int main() {
setA("atest");
@alpgul
alpgul / globalErrorHandler.js
Created September 28, 2021 11:55
Global Error Handler
(function(){
/**
* Capture error data for debugging in web console.
*/
var captures = [];
/**
* Wait until `window.onload`, so any external scripts
@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
}