Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
# | |
# clang modules-ts example | |
# | |
source = src | |
modules = build/modules | |
objects = build/objects | |
output = build/output | |
CXX = clang++ |
Notes on writing a Lua Bytecode VM. Lua is a compact, minimal language designed for embedding within a larger program to provide end-user customization of program behavior. This note outlines how I would breakdown implmementing the Lua Bytecode VM in Rust. The techniques are broadly applicable to any implementation language.
I would proceed by supporting a subset of Lua that uses only numbers then move on to tables with numbers. Lua 5.3 adds integers.
Form small tests cases, compile chunks of lua code and
var LINK_TYPE_SD = 'sd_src_no_ratelimit'; | |
var LINK_TYPE_HD = 'hd_src_no_ratelimit'; | |
(function downloadVideo(type) { | |
function getMyObject(doc) { | |
var scriptsCollection = doc.getElementsByTagName("script"); | |
var scripts = []; | |
var regExp = /video_ids/i; | |
for (var i = scriptsCollection.length - 1; i >= 0; i--) { | |
var script = scriptsCollection[i].innerHTML; |
// code nicked mainly from here: | |
// http://lazyfoo.net/tutorials/SDL/50_SDL_and_opengl_2/index.php | |
/* to compile | |
### installation on ubuntu | |
# install compiler etc | |
sudo apt-get install --yes software-properties-common g++ make | |
# install sdl2 |
Shader "Mattatz/StencilSample" { | |
Properties { | |
_Outline ("Outline Length", Range(0.0, 1.0)) = 0.2 | |
_Color ("Color", Color) = (0.8, 0.8, 0.8, 1.0) | |
_OutlineColor ("Outline Color", Color) = (0.2, 0.2, 0.2, 1.0) | |
} |
import zipfile | |
import sys | |
from pathlib import Path | |
def unzip(f, encoding, v): | |
with zipfile.ZipFile(f) as z: | |
for i in z.namelist(): | |
n = Path(i.encode('cp437').decode(encoding)) | |
if v: |
This is an unofficial, uncomplete and (pretty sure) wrong documentation of the RESTful service which powers the League of Legends spectator mode.
This documentation is desgined to be community driven and should be extended by everyone. If you find things missing, add them please!
Riot's spectator mode works by requesting replay data via HTTP form a service. The data is split in chunks which usually contain about 30 seconds of gameplay. Additionally there are key frames which seem to contain more information then a single chunk. They seem to be used to support
#ifdef _WIN32 | |
#include <GL/glut.h> | |
#else | |
#include <GLUT/glut.h> | |
#endif | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <png.h> | |
#include <iostream> |
#include <SDL2/SDL.h> | |
#define MUS_PATH "Roland-GR-1-Trumpet-C5.wav" | |
// prototype for our audio callback | |
// see the implementation for more information | |
void my_audio_callback(void *userdata, Uint8 *stream, int len); | |
// variable declarations | |
static Uint8 *audio_pos; // global pointer to the audio buffer to be played |