Skip to content

Instantly share code, notes, and snippets.

@calin-darie
calin-darie / localstorage-customtext.json
Last active December 6, 2022 08:27
monkeytype hermina
{
"ur recap with home row": "fdsa jkl; da adu far sa as da sa sa da jur jurul ruj fu fus suflu gugu gaga haha ga ha ",
"sd diff": "fdsa jkl; a sa a da da sa sa da ls ska lda sl ls dk kd dkd kdkd aks kk dd llss da adu far sa as da sa sa da jur jurul ruj fu fus suflu gugu gaga haha ga ha ",
"cm intro": "fff ccc f jjj mmm j ccc mmm mcm fcf fcf fcf jmj jmj jmj fj cm fj cam mac coco momo ce em ef je mea cea mai cea mie ceai face joc foc mama joi",
"cm recap mami si hermi": "fdsa jkl; fff ccc f jjj mmm j cccf mmmj mcmc fcf fcf fcf jmj jmj jmj fj cm fj eu sar sus a mea e cea mai mare eu is cea mai mare ea e sora mai mica joaca joc foal her herm hermi mami si hermi",
"cm recap mami si hermi 2 cioco lol jmj": "fdsa jkl; fcf jmj cm fj joc foal gugu gaga lol ciocola acolo coji de jmj mere coji de mere ema e sora mai mare fcf cine e sora mai mica jhj her jmj mami si hermi",
"vn intro hermina": "fdsajkl; fj f fcf fcvf fcvf fvvvf fvf fvf fvf vvvf ff vv ff fcf fcvf cvf vcf vvf vf v fjmj jmnj jmnj jnn
@calin-darie
calin-darie / gist:8f52b505463270f0dbb2a420ff5568a4
Created October 27, 2022 09:59
apply greyscale to canvas #js #html5
function applyLumaGreyscale(canvasContext) {
const imgData = canvasContext.getImageData(0, 0, canvasContext.canvas.width, canvasContext.canvas.height);
const pixelChannels = imgData.data;
for (let i = 0; i < pixelChannels.length; i += 4) {
const lightnessLuma = parseInt(
pixelChannels[i] * 0.299 + pixelChannels[i + 1] * 0.587 + pixelChannels[i + 2] * 0.114
);
pixelChannels[i] = lightnessLuma;
@calin-darie
calin-darie / karabiner.json
Created September 22, 2022 08:41
windows shortcuts on mac - karabiner
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
<!DOCTYPE html>
<html>
<head>
<style>
input.switch {
position: relative;
display: inline-block;
width: 3em;
height: 3ch;
margin: 0px;