Skip to content

Instantly share code, notes, and snippets.

@roffe
roffe / index.html
Created October 5, 2018 17:53
Matrix rain animation using HTML5 canvas and javascript
<canvas id="c"></canvas>
@Techgokul
Techgokul / Matrixrain.html
Created December 7, 2017 12:14
Make a Matrix rain using HTML5,JS,CSS
<html>
<head>
<title>Matrix Rain</title>
<style>
* {margin: 0; padding: 0;}
body {background: black;}
canvas {display: block;}
</style>
</head>
<body>
@ca0v
ca0v / debounce.ts
Last active June 19, 2024 11:20
Typescript Debounce
// ts 3.6x
function debounce<T extends Function>(cb: T, wait = 20) {
let h = 0;
let callable = (...args: any) => {
clearTimeout(h);
h = setTimeout(() => cb(...args), wait);
};
return <T>(<any>callable);
}
@bgromov
bgromov / git-reset-author.sh
Created June 23, 2016 17:50
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD