Skip to content

Instantly share code, notes, and snippets.

@rm-code
rm-code / index.html
Created Jan 22, 2021
Pixel Sorting by Luma-Value
View index.html
<img id="img-src" class="img-fluid" style="display: none" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wgARCAPABQADASIAAhEBAxEB/8QAHAABAQEAAwEBAQAAAAAAAAAAAAECAwQFBgcI/8QAGgEBAQEBAQEBAAAAAAAAAAAAAAECAwQFBv/aAAwDAQACEAMQAAAB/LNce/Z4d6xd45Ncd1jk1x61neuPWs7ubrOrms6RZpFWxZbmlSpUqVLVRZbCWxWmamrm2bZus6SoFAASxAAAigBLAAESlgIAoQAQWAAIAAqVEItgWEELUAAhSHQ87t9T5v2OeM4663Ry+h5ve7c+ys9/xajUthKlSoq2CkS2KthNXNstzbKlQCoKgqCoq3KNMq1ck0yKzSsl+W3xb+P93k1i7xvWLrO9Yus71i6xyXFueS4us7ZtmkWaQmkVbFluaW5qW5tlQmkVpCauVbuNXOrm2aRcrKQpAAAqAECKAIBKBABKQAACFgAoCWQCwAkoAhYFRKBc9zpTfkcPJj5n2OWbyvc4Oz1+mXoef6Op2+G593x7c3WKlRYqpUqWqhLYKEtzbNIs0hKKsCoKgqCoFgAWCxIqD5XfFv4/3uTfHreN3N3jWs251c3U3caud649azu5us6ZtzpBpFmrkmktLFmkJbBbm2VCaRWrm2aubc6ubZpKgWAAqAEpAAAlSoCWASpYACAAKAABBKIJZKAgoQAAlxNdfseX6Hn+j5Ms8Xq3jWa7W+Dm3Hf8/vdMc5Pb8qo1ythKKqEtzSos0g0izSE1c2rYsq
View index.html
<div class="container">
<div class="row">
<div class="col-12 ">
<img id="img-src" class="img-fluid" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wgARCAGrAoADASIAAhEBAxEB/8QAGwAAAgMBAQEAAAAAAAAAAAAAAwQBAgUGAAf/xAAaAQADAQEBAQAAAAAAAAAAAAAAAQIDBAUG/9oADAMBAAIQAxAAAAHP95iZmLUlVkdLDHC7mBA4vRnAfS3kNzjc6TK1sbPAR8lwECzN/LTLZ5lRJPrTc25w3VGou2WDBuTObvoAHRytXGqKWHstTquJ3tBkuf7N3XhaNenaSe8D02F7Q9Bo6a3p8uEsRbt81MJubtbdFjpWZWsnCjQhVMpFN0Qiyi3CwaI1PalOc7nhorDskzYgEFdViDSNjnht0GJh0oQs63x6aidGba5LV0AgPYyHod8rVQpgRaX3zu2ueR+g0sb10Mm/DdGqR2Tp0RI3GXoIy2CLFEZ/N0pKK0UAi3lLUb2bqyxJmK1idQ03lowuxE1mJtVod6JTX+d9Qi/hZnlDF755rN6fK9TzVU3GbjJS7NeT502tHTGtnuVgWrV2mDzlILsLMTQaDcaDm9DhiNCLbbqp6ylbzNMLNKJPoSkNVi2o30RQey1lgV9ZYVMteYTmFWbmWzUMoL2b0J+uleKTszeDJhsIhNrxFSkwBsdCJ5vTYVETq1GSXZUhRKJbueGNv5LVtvR57qM60tcd/G9Bdcw42YztGcdFXCB5GaVW9M1R
@rm-code
rm-code / ArrayRotation.lua
Last active Aug 21, 2022
Helper module which allows the rotation of square and non square arrays.
View ArrayRotation.lua
--==================================================================================
-- Copyright (C) 2017 by Robert Machmer =
-- =
-- Permission is hereby granted, free of charge, to any person obtaining a copy =
-- of this software and associated documentation files (the "Software"), to deal =
-- in the Software without restriction, including without limitation the rights =
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell =
-- copies of the Software, and to permit persons to whom the Software is =
-- furnished to do so, subject to the following conditions: =
-- =
@rm-code
rm-code / main.lua
Created Apr 5, 2017
Raindrop code doodle with Lua and LÖVE
View main.lua
local MIN_SPAWN = -800
local MAX_SPAWN = -100
local DROP_WIDTH = 5
local DROP_HEIGHT = 20
local drops = {}
local ripples = {}
local index = 1
@rm-code
rm-code / ProFi.lua
Last active Mar 5, 2022 — forked from perky/ProFi.lua
Forked from (https://gist.github.com/perky/2838755) || ProFi, a simple lua profiler that works with LuaJIT and prints a pretty report file in columns.
View ProFi.lua
--[[
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php.
Updated to v1.4 by Robert Machmer 2017
Example:
ProFi = require 'ProFi'
ProFi:start()
some_function()
another_function()
coroutine.resume( some_coroutine )
@rm-code
rm-code / count_loc.sh
Last active Jan 15, 2017
Bash one-liners to count lines of code.
View count_loc.sh
# Only returns the total lines of code.
# Remove the tail call to show a more verbose output.
wc -l $(find . -name '*.lua') | tail -1
# Add more files as parameters.
wc -l $(find . -name '*.lua' -or -name '*.sh' ) | tail -1
# This would return the lines of code of all .lua files in your repository.
# Simply exchange .lua with the extension you want to search for.
wc -l $(git ls-files | grep -e '.*\.lua' )
@rm-code
rm-code / style.less
Created May 11, 2015
Custom tab style for Atom's zen package
View style.less
@import "ui-variables";
@import "syntax-variables";
// Make zen tabs more zen-like
[data-zen="true"] {
atom-pane-container atom-pane .item-views {
background: @syntax-background-color !important;
}
atom-text-editor:not(.mini) {
margin: 0 auto;