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
import string | |
import sys | |
import re | |
# define method that can censor a string | |
def censor(the_input, blacklist, replacements): | |
# create a receptacle for the censored output | |
censored = [] | |
# split input into words, using the regex split method to preverve formatting | |
words = re.split(r'(\s+)', the_input) |
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
<audio controls autoplay muted volume="0.5"> | |
<source src="audio_file.ogg" type="audio/ogg"> | |
<source src="audio_file.mp3" type="audio/mpeg"> | |
</audio> |
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
<video controls preload="metadata" autoplay loop muted poster="poster_image.png"> | |
<source src="video_file.mp4" type="video/mp4"> | |
<source src="video_file.ogg" type="video/ogg"> | |
<!-- | |
Accessibility: Include valid WEBVTT caption file(s) | |
https://developer.mozilla.org/en-US/Apps/Build/Audio_and_video_delivery/Adding_captions_and_subtitles_to_HTML5_video | |
https://quuz.org/webvtt/ | |
--> | |
<track label="English" kind="subtitles" srclang="en" src="subtitles-en.vtt" default> | |
<track label="Director's Commentary In German" kind="captions" srclang="de" src="commentary-de.vtt"> |
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
/* use a CSS selector to change the value of multiple text inputs on a page with the browser console */ | |
// Enter a css selector to operate on | |
var theSelectorIsHere = 'TYPE_HERE'; | |
// Enter desired value | |
var whatItShouldBe = 'TYPE_HERE'; | |
// Don't worry about this part, paste in the the browser console | |
var whereItShouldBe = document.querySelectorAll(theSelectorIsHere); |
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 spritemap definition & usage example --> | |
<!-- | |
Define Some SVGs | |
External .svg file recommended, or inline below opening <body> | |
--> | |
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> | |
<symbol id="icon1" viewBox="0 0 161.4 188.9"> | |
<title>For Screenreaders</title> |
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
<table> | |
<thead> | |
<tr> | |
<th scope="col">DATA1</th> | |
<th scope="col">DATA2</th> | |
<th scope="col">DATA3</th> | |
</tr> | |
</thead> | |
<tfoot> | |
<tr> |
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 myfunc --description "Basic Function. Args Are Built In" | |
echo $argv | |
echo $argv[1] $argv[2] # no zero indices in the ocean... | |
end | |
# └> myfunc one two three | |
# one two three | |
# one two two | |
function myfunc --description "Basic Function With Variables" |
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
# credit to http://www.artificialworlds.net/blog/2012/10/17/bash-associative-array-examples/ | |
# Basics | |
declare -A MYMAP # Create an associative array | |
MYMAP[foo]=bar # Put a value into an associative array | |
echo ${MYMAP[foo]} # Get a value out of an associative array | |
# => bar | |
echo MYMAP[foo] # WRONG | |
# => MYMAP[foo] |
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
^[^THIS|THAT].* |
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
^(.*)(\r?\n\1)+$ |