This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg width="40" height="40" viewBox="0 0 100 100" | |
xmlns="http://www.w3.org/2000/svg"> | |
<filter id="displacementFilter"> | |
<feTurbulence type="fractalNoise" baseFrequency="0.75" | |
numOctaves="2" result="turbulence" stitchTiles="stitch"/> | |
</filter> | |
<rect id="noise-square" width="40" height="40" | |
style="filter: url(#displacementFilter)"/> | |
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.box { | |
border-image: repeating-linear-gradient(40deg, hsl(30, 50%, 15%), hsl(20, 50%, 30%), hsl(25, 40%, 20%) 8px) 60; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function floorToBeginningOfDay(date) { | |
return new Date(date.toLocaleDateString()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var eventListeners = { | |
eventName: [] | |
}; | |
function addEventListener(type, listener) { | |
var listeners = eventListeners[type]; | |
if (listeners) { | |
listeners.push(listener); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this in the console when you have a Wikipedia page open. | |
// First, get the wikitable element you want and add an id of `main-table` to it. | |
// Then: | |
var rows = document.querySelectorAll('#main-table tr'); | |
var extracted = []; | |
function extractFromRow(row) { | |
if (row.children.length > 2) { | |
let event = { | |
yearsFromNow: row.children[1].textContent.replace(/\n/g, '').replace(/\[note \d+\]/g, ''), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Assuming $title and $name are read from input. | |
# ... | |
# Escaping space characters is only necessary within the shell script. | |
# If you're running the find...sed command directly in the shell, you don't need to escape spaces. | |
cleanedtitle="${title// /\\ }" | |
# Replace the placeholders with the title (with escape characters inserted). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rsync -a $(HOMEDIR) $(USER)@$(SERVER):$(SERVERDIR) --exclude node_modules/ --omit-dir-times --no-perms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for file in ./recup_dir*/*.$1 | |
do | |
mv ${file} $1 | |
done | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for file in ./recup_dir*/*.mp4 | |
do | |
mv ${file} mp4 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tar -zcvf project.tgz --exclude "./project/node_modules" ./project |