Skip to content

Instantly share code, notes, and snippets.

View sokcuri's full-sized avatar

Sokcuri sokcuri

View GitHub Profile
@mukunda-
mukunda- / slinkedlist.h
Last active May 15, 2022 20:43
unique_ptr linked list
#pragma once
// Smart linked list.
namespace Util {
template <class T> class SLinkedList;
/// ---------------------------------------------------------------------------
/// Defines the links in an object. Objects added to a SLinkedList must
@themasch
themasch / doc.md
Last active December 31, 2024 17:34
unofficial docs of the LoL Spectator API

REST Service for LoL spectators

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!

How it works

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

@komiga
komiga / utf8-constexpr.cpp
Last active October 17, 2020 23:25
constexpr UTF-8 decoder.
#include <cstdint>
#include <type_traits>
#include <stdexcept>
#include <iostream>
using Unit = uint8_t;
using Point = uint32_t;
namespace utf8 {
@mrwweb
mrwweb / reset-rems
Created May 22, 2013 13:22
"Sanity-ize" REMs by setting them to 10px-baseline aka "Tiny Happy Pixels Dancing."
/* this is the "root" in "root em." */
html {
font-size: 62.5%; /* Now 10px = 1rem! */
}
body {
font-size: 16px; /* px fallback */
font-size: 1.6rem; /* default font-size for document */
line-height: 1.5; /* a nice line-height */
}
@gre
gre / easing.js
Last active May 9, 2025 01:18
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@tsabat
tsabat / zsh.md
Last active April 21, 2025 07:22
Getting oh-my-zsh to work in Ubuntu
@terrancesnyder
terrancesnyder / regex-japanese.txt
Created November 7, 2011 14:05
Regex for Japanese
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)