This file contains hidden or 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
<div id="landingpageContent"></div> | |
<script> | |
fetch("{{htmlFragmentUrl}}") | |
.then(response => response.text()) | |
.then(html => { | |
const range = document.createRange(); | |
range.selectNode(document.getElementById('landingpageContent')); | |
const documentFragment = range.createContextualFragment(html); | |
document.getElementById('landingpageContent').appendChild(documentFragment); |
This file contains hidden or 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
javascript: (function () { | |
var locationStr = window.location.toString(), | |
shopping = SC.SESSION.touchpoints.viewcart.replace( | |
"goToCart", | |
"shopping-local" | |
); | |
if (/-local.ssp/.test(locationStr)) { | |
window.location = locationStr.replace("-local.ssp", ".ssp"); | |
} else if (/(my_account|checkout).ssp/.test(locationStr)) { | |
window.location = locationStr.replace(".ssp", "-local.ssp"); |
This file contains hidden or 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
/* By default this will return the distance in kilometers, but will return | |
* miles when the inMiles argument is true. | |
*/ | |
function haversineEarthDistance(lat1, lon1, lat2, lon2, inMiles) { | |
function toRads(x) { return (x * Math.PI) / 180; } | |
var EARTH_RADIUS_KM = 6373; | |
var KM_PER_MI = 1.609344; | |
var dLat = toRads(lat2 - lat1); |
This file contains hidden or 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
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c | |
--- a/ext/openssl/ossl_ssl.c | |
+++ b/ext/openssl/ossl_ssl.c | |
@@ -107,6 +107,18 @@ | |
OSSL_SSL_METHOD_ENTRY(TLSv1), | |
OSSL_SSL_METHOD_ENTRY(TLSv1_server), | |
OSSL_SSL_METHOD_ENTRY(TLSv1_client), | |
+#if defined(HAVE_TLSV1_2_METHOD) && defined(HAVE_TLSV1_2_SERVER_METHOD) && \ | |
+ defined(HAVE_TLSV1_2_CLIENT_METHOD) | |
+ OSSL_SSL_METHOD_ENTRY(TLSv1_2), |
This file contains hidden or 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
# | |
# www.reddit.com/r/programming/comments/358tnp/five_programming_problems_every_software_engineer/ | |
# | |
# THE 5TH EXERCISE: | |
# | |
# Write a program that outputs all possibilities to put + or - or nothing between | |
# the numbers 1, 2, ..., 9 (in this order) such that the result is always 100. | |
# For example: 1 + 2 + 34 – 5 + 67 – 8 + 9 = 100. | |
# |
This file contains hidden or 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
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | |
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | |
$objForm = New-Object System.Windows.Forms.Form | |
$objForm.Text = "Shutdown Timer" | |
$objForm.Size = New-Object System.Drawing.Size(300,200) | |
$objForm.StartPosition = "CenterScreen" | |
$objForm.KeyPreview = $True | |
$objForm.Add_KeyDown({if ($_.KeyCode -eq "Enter") |