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/bash | |
MESSAGE="Message" | |
SLACK_CHANNEL="#slack-channel" | |
SLACK_TOKEN=xoxb-1234-000000000000 | |
curl -X POST \ | |
-H "Authorization: Bearer $SLACK_TOKEN" \ | |
-H "Content-type: application/json; charset=utf-8" \ | |
--data '{"channel":"'$SLACK_CHANNEL'","text":"'"$MESSAGE"'"}' \ |
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
// quickly hacked together from this article, thanks friend | |
// https://medium.com/cyberdoggo/luhn-algorithm-in-javascript-python-clojure-part-1-c4ea3079d0f7 | |
const isEven = number => number % 2 === 0 | |
const calculateEven = even => (even * 2 < 10) ? even * 2 : even * 2 - 9 | |
const generateCheckSum = card => { | |
const checksum = card.split('') | |
.map((number, index) => (isEven(index)) ? calculateEven(number) : parseInt(number, 10)) |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Page title (goes in the tab on the browser)</title> | |
</head> | |
<body> | |
</body> |