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
# Image processing with ImageMagick | |
# Usage: make resize-images | |
# Define directories | |
ASSETS_DIR = assets | |
SMALL_HEIGHT = 360 | |
LARGE_HEIGHT = 1080 | |
# Find all image files but exclude _small and _large versions | |
ORIGINAL_IMAGES := $(shell find $(ASSETS_DIR) -type f \( \ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.flowchart-link { | |
stroke-dasharray: 4, 4 !important; | |
animation: flow 1s linear infinite; | |
stroke-width: 2px !important; | |
} |
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
Quality Attribute | Software 1.0 | Software 2.0 | |
---|---|---|---|
Maintainability | Cyclometric Dependencies & Sotograph | Interpretability and Explainability |
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
/** | |
* Calculates the prime factors for a given number. | |
* - Note: Currently the function will chrash with numbers greater than ~2000 because of the recursive nature. | |
* - This could potentially be optimized with e.g. proper tail calls | |
* | |
* @param {number} number - number used to calculate the prime factors | |
* @returns {array} primeFactors | |
*/ | |
function calculatePrimeFactor (number, prime = 2, results = []) { | |
if (number >= prime && number % prime === 0) { |
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
// http://progrium.com/blog/2012/11/26/x-callback-header-an-evented-web-building-block/ | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec | |
// input | |
var input = <http://example.com/callback/>; method="post"; secret="123"; secret2="123" | |
// regex deliver url and method: | |
// <(http:\/\/\S*)>.*method="(\w*)" | |
var matches = /<(http:\/\/\S*)>.*method="(\w*)"/.exec(input); |