Skip to content

Instantly share code, notes, and snippets.

View lloydjatkinson's full-sized avatar
🌧️
Chilling

Lloyd Atkinson lloydjatkinson

🌧️
Chilling
View GitHub Profile
using System;
using System.Threading.Channels;
using System.Threading.Tasks;
namespace ChannelsAreCool
{
//Disclaimer : I didn't actually run this code so it might not quite work.
//Feel free to complain or ask questions and i'll fix it.
public static class Example
{
@steven2358
steven2358 / ffmpeg.md
Last active April 4, 2025 02:43
FFmpeg cheat sheet
anonymous
anonymous / Gb.cs
Created December 20, 2017 08:43
[StructLayout(LayoutKind.Sequential)]
public struct GbColor
{
public byte R;
public byte G;
public byte B;
}
private readonly GbColor[] _framebuffer = new GbColor[160 * 144];
public class PostActionTransformation<T> : ISpecimenBuilderTransformation
{
private readonly List<ISpecimenCommand> _commands = new List<ISpecimenCommand>();
public ISpecimenBuilder Transform(ISpecimenBuilder builder)
{
return new Postprocessor(
builder,
new CompositeSpecimenCommand(_commands),
new IsAssignableToTypeSpecification(typeof(T)));
@mtranggit
mtranggit / .block
Last active October 15, 2018 22:07
Make d3 responsive
license: mit
@TAGC
TAGC / tictactoe.py
Last active July 16, 2017 23:43
Variable sized Tic-Tac-Toe end game detection logic in Python
from itertools import permutations
import math
X = 'X'
O = 'O'
_ = ' '
def inter_value_differences(values):
@clarkbw
clarkbw / redux-performance-mark.js
Last active February 8, 2024 05:03
A User Timing middleware for redux to create performance markers for dispatched actions
const timing = store => next => action => {
performance.mark(`${action.type}_start`);
let result = next(action);
performance.mark(`${action.type}_end`);
performance.measure(
`${action.type}`,
`${action.type}_start`,
`${action.type}_end`
);
return result;
@alexandrnikitin
alexandrnikitin / AhoCorasickTree.cs
Created April 14, 2017 07:44
Aho-Corasick C# implementation
using System.Collections.Generic;
using System.Linq;
namespace AhoCorasickTree
{
public class AhoCorasickTree
{
internal AhoCorasickTreeNode Root { get; set; }
public AhoCorasickTree(IEnumerable<string> keywords)
@CodeMyUI
CodeMyUI / christmas-lights.markdown
Created December 28, 2016 01:14
Christmas lights
@callumlocke
callumlocke / README.md
Created October 26, 2015 14:38
Importing individual lodash-es functions
import chunk from 'lodash-es/array/chunk';
import zipObject from 'lodash-es/array/zipObject';

console.log(zipObject(chunk(['a', 'b', 'c', 'd'], 2)));
$ rollup -f=iife demo.js > output.js