Skip to content

Instantly share code, notes, and snippets.

View rexim's full-sized avatar
📺
https://twitch.tv/tsoding

Alexey Kutepov rexim

📺
https://twitch.tv/tsoding
View GitHub Profile
@rexim
rexim / Main.hs
Last active June 15, 2023 17:15
Epic Screencast Adder PauseChamp
module Main where
import qualified Data.Text as T
import qualified Data.Text.IO as T
import System.Directory
import Data.Functor
-- NOTE: Yt stands for YouTube. It's a YouTube link to the video
type Yt = T.Text
#!/usr/bin/env python3
import random
cs = "BCDFGHJKLMNPQRSTVWXZY"
vs = "AEIOU"
def generate_name(n=3):
result = ""
for i in range(n):
@rexim
rexim / Queue.org
Last active July 26, 2022 19:23
Friday Queue

Friday Queue

Current User: Just “Travis”

Use !friday command to put a video here (only for trusted and subs). Any video can be skipped if the streamer finds it boring.

0xgor

Video Count 2

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h> /* of course */
#include <X11/Xutil.h> /* duuuh */
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h> /* obviously */
@rexim
rexim / Help.org
Last active February 21, 2022 23:04
HyperNerd Commands
BITS 64
%define SYS_exit 60
%define SYS_read 0
%define SYS_write 1
%define SYS_rt_sigaction 13
%define SYS_rt_sigreturn 15
%define STDIN 0
%define STDOUT 1
%define SIGINT 2
@rexim
rexim / emoteJAM.md
Last active May 2, 2021 09:25
emoteJAM Elevator Pitch Document

emoteJAM

emoteJAM is a simple website that generates animated BTTV emotes from static images.

That idea is to apply a well established "meme meta filters" to static emotes. Such as JAM, Hop, etc.

The most important feature of the website is that it's completely client-side and can be easily deployed to something like GitHub Pages. It uses WebGL to animate static images and gif.js to generate actual GIF files inside of your browser.

The project is currently in development and not available to general public until it's more or less feature-complete.

#!/usr/bin/env python3
# https://www.hackerrank.com/challenges/alphabet-rangoli/problem
import math
# ----c----
# --c-b-c--
# c-b-a-b-c
# --c-b-c--
@rexim
rexim / main.c
Created March 30, 2021 11:46
Simple dl example using SDL2 on Linux
// $ cc -o main main.c -ldl
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <dlfcn.h>
#define SDL_LIBRARY_NAME "libSDL2-2.0.so"
#define SDL_INIT_VIDEO 0x00000020u
#define SDL_WINDOW_RESIZABLE 0x00000020
// $ gcc `pkg-config --cflags libcurl` -o main main.c `pkg-config --libs libcurl`&& ./main
#include <stdio.h>
#include <stdlib.h>
#include <curl/curl.h>
int main(void)
{
if (curl_global_init(CURL_GLOBAL_DEFAULT) != 0) {
fprintf(stderr, "ERROR: could not initialize global CURL state for some reason.\n");