Skip to content

Instantly share code, notes, and snippets.

View julia-mareike's full-sized avatar
🌻

Julia julia-mareike

🌻
View GitHub Profile
@julia-mareike
julia-mareike / slack-notification.sh
Created June 16, 2020 01:36
Send slack message via curl
#!/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"'"}' \
@julia-mareike
julia-mareike / credit-card-generator.js
Last active May 3, 2023 10:37
Generate & validate credit cards based on BIN number
// 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))
@julia-mareike
julia-mareike / Basic.html
Created October 31, 2017 07:23
Basic html
<!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>