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
.grid .cell { | |
position: relative; | |
margin: 1rem 1rem 2rem; | |
} | |
@media screen and (min-width: 600px) { | |
.grid { | |
display: flex; | |
flex-wrap: wrap; | |
flex-direction: row; |
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 video_events = { | |
'abort' : 'abort : The loading of an audio/video is aborted', | |
'canplay' : 'canplay : The browser can start playing the audio/video', | |
'canplaythrough' : 'canplaythrough : The browser can play through the audio/video without stopping for buffering', | |
'durationchange' : 'durationchange : The duration of the audio/video is changed', | |
'emptied' : 'emptied : The current playlist is empty', | |
'ended' : 'ended : The current playlist is ended', | |
'error' : 'error : An error occurred during the loading of an audio/video', | |
'loadeddata' : 'loadeddata : The browser has loaded the current frame of the audio/video', | |
'loadedmetadata' : 'loadedmetadata : The browser has loaded meta data for the audio/video', |
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
# Find all files with uppercase extensions | |
find . -type f -regex '.*\.[A-Z]\{1,\}' | |
# Count all files with uppercase extensions | |
find . -type f -regex '.*\.[A-Z]\{1,\}' | wc -l | |
# Find all file extensions that exceed 2MB | |
find . -type f -name "*.*" -size +2M | sed 's|.*\.||' | sort -u |
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
def getFilteredList(list=[], pfx='', sfx=''): | |
filteredList = [] | |
for item in list: | |
isMatch = False | |
if pfx and not sfx: isMatch = item.startswith(pfx) | |
if not pfx and sfx: isMatch = item.endswith(sfx) | |
if pfx and sfx: isMatch = item.startswith(pfx) and item.endswith(sfx) | |
if isMatch: filteredList.append(item) | |
return filteredList |
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
// https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent | |
[ | |
{ | |
name : "target", | |
type: "EventTarget", | |
description: "The event target (the topmost target in the DOM tree)." | |
}, | |
{ | |
name : "type", | |
type: "DOMString", |
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
// Quick and easy HTTP Error Messages | |
// @ https://gist.github.com/aidilfbk/1363383 | |
var get_http_error_message = function (code) { | |
var http_errors = { | |
100: "Continue", | |
101: "Switching Protocols", | |
102: "Processing", | |
103: "Checkpoint", | |
122: "Request-URI too long", | |
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 dir2iso() { | |
echo "Generating ISO: ${1} -> ${1}.iso" | |
hdiutil makehybrid -iso -joliet -o ${1}.iso ${1} | |
} | |
alias dir2iso=dir2iso |
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
/** | |
* Returns an object of elements, from a given list of ids (ev) | |
* @return {object} Object containing any matching element ids, assigning | |
* the id as the key | |
*/ | |
var getElementsByIds = function() { "use strict"; | |
var r = {}, | |
a = [].slice.call(arguments), | |
e,id,i; | |
for (i=0; i<a.length; i++) { |
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 class allows you to assign an eventListener to be utilzed only once, before | |
* it removes itself. | |
* | |
* # Usage Example: | |
* var elem = document.createElement('div'); | |
* var onetimer = new SingleEvent(elem, "click", function(){alert("Well, I'll never do THAT again...");}); | |
* document.body.appendChild(elem); | |
*/ | |
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
curl -F "upload_filename=@/full/path/to/local/file.txt" -F "myotherqueryvar=queryvalue" -L http://198.101.215.168/upload.php > html_out.htm |