Skip to content

Instantly share code, notes, and snippets.

View anio's full-sized avatar
🏴‍☠️
war situation

ali anio

🏴‍☠️
war situation
View GitHub Profile
@anio
anio / youtube-rss-feed-url-generator.md
Last active June 16, 2023 18:19
Youtube RSS feed URL generator

You can have it as a oneliner:

curl -s https://www.youtube.com/@CHANNEL | grep -Po '"canonical" href="https://www.youtube.com/channel/\K.*?(?=">)' | xargs -I@ echo 'https://www.youtube.com/feeds/videos.xml?channel_id=@'

Or as a bash function

youtube-rss-generator () {
@anio
anio / regex_example.c
Created March 29, 2020 01:30
A Simple libc regex.h Example
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <regex.h>
#define MAXM 1024
int main(int argc, char **argv) {
@anio
anio / kernel-hacker.read-mode.user.js
Last active March 2, 2020 11:58
Kernel Hacker Read Mode userscript
// ==UserScript==
// @name Kernel hacker read mode
// @namespace org.kernel
// @match https://www.kernel.org/*
// @grant none
// @version 1.0
// @author -
// @description -
// ==/UserScript==
@anio
anio / __line.js
Created January 25, 2015 12:40
__line : Return Line Number
Object.defineProperty(global, '__stack', {
get: function(){
var orig = Error.prepareStackTrace;
Error.prepareStackTrace = function(_, stack){ return stack; };
var err = new Error;
Error.captureStackTrace(err, arguments.callee);
var stack = err.stack;
Error.prepareStackTrace = orig;
return stack;
}