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
# Modified from: http://stackoverflow.com/a/11010158/215200 | |
$fromFolder = "D:\FOLDER\" | |
$rootName = "FILENAME" | |
$ext = "EXT" | |
$from = "{0}{1}.{2}" -f ($fromFolder, $rootName, $ext) | |
$fromFile = [io.file]::OpenRead($from) | |
$upperBound = 100MB |
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
/* Stolen from: https://alligator.io/css/system-font-stack/#monospace-system-font-stack */ | |
code, kbd { | |
font-family: | |
/* macOS, iOS */ | |
SFMono-Regular, | |
Menlo, | |
Monaco, | |
/* Windows */ |
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
export enum RobotType { | |
Agriculture, | |
Constructor, | |
Drone, | |
Karaoke, | |
Vehicle | |
} | |
export interface IRobot { | |
readonly id: string; |
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
/****************** | |
jQuery Plugin | |
Name: PLUGIN | |
Author: Miles Rausch (http://awayken.com) | |
Version: VER | |
******************/ | |
(function($){ | |
$.PLUGIN = function(el, PARAM, options){ | |
// To avoid scope issues, use 'base' instead of 'this' | |
// to reference this class from internal events and functions. |
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
// Global maps | |
const preloaded = new Map(); | |
const preloading = new Map(); | |
function buildPreload(url = '') { | |
// If we have a URL | |
if (url.length) { | |
// Create a prefetch <link /> | |
const el = document.createElement('link') | |
el.rel = 'prefetch' |
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() { | |
const tags = document.querySelectorAll('[property^="og:"]') | |
let taginfo = `<div style="overflow: auto; padding-bottom: .5em;">`; | |
if (tags.length) { | |
taginfo += `<div style="text-align: center; padding-bottom: .5em; margin-bottom: .5em; border-bottom: 1px solid #000">🎉 Found ${tags.length} Open Graph ${tags.length === 1 ? 'tag' : 'tags'}!</div>` | |
for (const item of tags) { | |
const property = item.getAttribute('property') |
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
<cfscript> | |
param name='args.qrURL' default=prc.page.getCanonical(); | |
</cfscript> | |
<cfoutput> | |
<div class="u--printonly detail--trackprint"> | |
<p>#_('qrcode_explanation', 'Scan the following QR code to learn more.')#</p> | |
<img class="u--box" src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=#HTMLEditFormat( args.qrURL )#" alt=""> | |
<p>(#HTMLEditFormat( args.qrURL )#)</p> | |
<img src="?trackprint" alt=""> |
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
<cfset local.cacheKey = hash( cgi.http_host, 'sha1' ) & '_CHANGEME'> | |
<cfset local.cacheTimespan = createtimespan( 0, 0, 10, 0 )> | |
<cfset local.cacheHTML = ""> | |
<cfcache action="get" id="#local.cacheKey#" name="local.cacheHTML"> | |
<cfif isNull( local.cacheHTML )> | |
<cfsavecontent variable="local.cacheHTML"> | |
<!--- CFML here ---> | |
</cfsavecontent> | |
<cfcache action="put" id="#local.cacheKey#" value="#local.cacheHTML#" timespan="#local.cacheTimespan#"> |
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
[alias] | |
## Compound command alias | |
# View all alias | |
alias = !"git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\t=> \\2/' | sort" | |
# Pull in remote changes for the current repository and all its submodules | |
p = !"git pull; git submodule foreach git pull origin master" | |
# Stage all missing files for delete | |
r = !"git ls-files -z --deleted | xargs -0 git rm" | |
# Show all files modified using `git assume` alias | |
assumed = !"git ls-files -v | grep ^h | cut -c 3-" |
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
Genius is eternal patience. |
NewerOlder