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
/* Courtesy of Steve Souders, #ImageCon17, San Francisco, US */ | |
/* Details: https://developer.mozilla.org/en-US/docs/Web/API/Performance */ | |
<link rel="stylesheet" href="/huge-slow.css"> | |
<img src="hero.jpg" | |
onload="performance.clearMeasures('hero'); | |
performance.measure('hero')"> | |
<script> |
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
// Create a global Event Bus | |
var EventBus = new Vue() | |
// Add to Vue properties by exposing a getter for $bus | |
Object.defineProperties(Vue.prototype, { | |
$bus: { | |
get: function () { | |
return EventBus; | |
} | |
} |
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
const original = [0,1,2,3]; | |
const copy = Object.assign([], original, { 2: 42 }); // [0,1,42,3] | |
console.log(original); | |
// [ 0, 1, 2, 3 ] | |
console.log(copy); | |
// [ 0, 1, 42, 3 ] |
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
<?php | |
error_reporting(E_ALL & ~E_NOTICE); | |
ini_set('display_errors', 1); | |
$_HTTP = !empty($_SERVER['HTTPS']) ? 'https://' : 'http://'; | |
// change this by country (gls-hungary.com, gls-slovakia.sk, gls-czech.com, gls-romania.ro, gls-slovenia.com, gls-croatia.com) | |
$wsdl_path = $_HTTP.'online.gls-slovakia.sk'.'/webservices/soap_server.php?wsdl&ver=14.11.03.01'; | |
$client = new SoapClient($wsdl_path); |
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
<svg preserveAspectRatio="xMinYMin" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" | |
viewBox="0 0 560 1388"> | |
<defs> | |
<mask id="canTopMask"> | |
<image width="560" height="1388" xlink:href="img/can-top-alpha.png"></image> | |
</mask> | |
</defs> | |
<image mask="url(#canTopMask)" id="canTop" width="560" height="1388" xlink:href="can-top.jpg"></image> | |
</svg> |
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
#!/bin/sh | |
# halp!!4 | |
if [ $# -eq 0 ] || [ $1 == "--help" ] || [ $1 == "-h" ] || [ $1 == "/?" ]; then | |
echo "check ticket online, pinging jira; usage:" | |
echo "script (-v) [filename]" | |
echo "-v = verbose, optional; dumps messages, not just the exit codes" | |
echo "filename = name of the file containing the commit message, required" | |
exit 0 | |
fi |
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
/** | |
* Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers | |
* @author ShirtlessKirk. Copyright (c) 2012. | |
* @license WTFPL (http://www.wtfpl.net/txt/copying) | |
*/ | |
var luhnChk = (function (arr) { | |
return function (ccNum) { | |
var | |
len = ccNum.length, | |
bit = 1, |