Skip to content

Instantly share code, notes, and snippets.

@ManzDev
ManzDev / rollup.config.js
Created February 24, 2018 17:13
RollUp Config file for easy ES6 to ES5 bundle
import babel from 'rollup-plugin-babel';
import eslint from 'rollup-plugin-eslint';
import resolve from 'rollup-plugin-node-resolve';
import multiEntry from 'rollup-plugin-multi-entry';
import uglify from 'rollup-plugin-uglify';
import filesize from 'rollup-plugin-filesize';
import commonjs from 'rollup-plugin-commonjs';
import progress from 'rollup-plugin-progress';
let pluginOptions = [
@tung
tung / twitch-vod-chat.py
Last active March 10, 2023 10:34
Download chat from a Twitch VOD and print it to a terminal.
#!/usr/bin/env python3
#
# A script to download chat from a Twitch VOD and print it to a terminal.
# Chat will be downloaded all the way until it ends.
#
# Usage: TWITCH_CLIENT_ID=0123456789abcdef0123456789abcde twitch-vod-chat.py [video_id] [start]
#
# This script could break at any time, because Twitch's chat API is
# undocumented and likes to change at any time; in fact, this script was
@htfy96
htfy96 / static_inline_example.md
Last active April 11, 2024 14:13
static inline vs inline vs static in C++

In this article we compared different behavior of static, inline and static inline free functions in compiled binary. All the following test was done under g++ 7.1.1 on Linux amd64, ELF64.

Test sources

header.hpp

#pragma once

inline int only_inline() { return 42; }
static int only_static() { return 42; }
@tung
tung / twitch-vod.py
Last active February 27, 2023 02:33
Play Twitch VODs in mpv with chat replay in terminal
#!/usr/bin/env python3
#
# Twitch VOD viewer with terminal chat replay.
#
# Usage: TWITCH_CLIENT_ID=0123456789abcdef0123456789abcde twitch-vod.py https://www.twitch.tv/videos/1234567890 [360p]
#
# Requires mpv and twitch-vod-chat.py - https://gist.github.com/tung/20de3e992ca3a6629843e8169dc0398e
#