Skip to content

Instantly share code, notes, and snippets.

View eyecatchup's full-sized avatar

Stephan Schmitz eyecatchup

View GitHub Profile
@eyecatchup
eyecatchup / crypto-sha.js
Created March 13, 2019 19:53 — forked from chrisveness/crypto-sha.js
Uses the SubtleCrypto interface of the Web Cryptography API to hash a message using SHA-256.
/**
* Returns SHA-256 hash from supplied message.
*
* @param {String} message.
* @returns {String} hash as hex string.
*
* @example
* sha256('abc').then(hash => console.log(hash));
* const hash = await sha256('abc');
*/

Complete AAF season 2019 schedule with free live streams

The Alliance of American Football (AAF) games can be watched live through AAF's TV partners, including CBS, CBSSN, NFL Network, TNT and B/R Live.

But also, most AAF games can be watched live via the free AAF.com website.

The official live stream URLs are public only a few hours before kickoff. But because the AAF live stream URLs are generated by the following pattern:

https://aaf.com/live/{internalGameId}
@eyecatchup
eyecatchup / install-phantomjs-from-source.sh
Created August 17, 2018 08:19
Install PhantomJS on Debian/Ubuntu from source
#!/usr/bin/env bash
# This script install PhantomJS in your Debian/Ubuntu System
#
# This script must be run as root:
# sudo sh install_phantomjs.sh
#
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
@eyecatchup
eyecatchup / README.md
Created May 21, 2018 12:23 — forked from surma/README.md
webpack-emscripten-wasm

Minimal example making webpack and wasm/Emscripten work together.

Build instructions:

  • Clone this gist
  • npm install
  • npm start
  • Open http://localhost:8080
  • Look at console
@eyecatchup
eyecatchup / package.json
Created April 19, 2018 14:45 — forked from surma/package.json
Boilerplate for quick one-off TypeScript projects. Just run `npm start`
{
"name": "tsquickstart",
"version": "1.0.0",
"description": "Boilerplate for quick one-off TypeScript projects. Just run `npm start`",
"scripts": {
"init": "test -f tsconfig.json || (tsc --init -t ESNext -m ESNext && npm install)",
"start": "npm run init && concurrently \"npm run watch\" \"npm run serve\"",
"serve": "http-server",
"watch": "tsc -p . --watch",
"build": "tsc -p ."
@eyecatchup
eyecatchup / certificate.sh
Created March 12, 2018 11:35 — forked from WebReflection/certificate.sh
A basic Self Signed SSL Certificate utility
#!/usr/bin/env bash
# A basic Self Signed SSL Certificate utility
# by Andrea Giammarchi @WebReflection
# https://www.webreflection.co.uk/blog/2015/08/08/bringing-ssl-to-your-private-network
# # to make it executable and use it
# $ chmod +x certificate
# $ ./certificate # to read the how-to
@eyecatchup
eyecatchup / accordion.html
Last active February 7, 2018 14:46 — forked from umidjons/accordion.html
AngularJS: Accordion with custom directives (restrict, replace, transclude, template, controller, angular.forEach(), scope, link)
<!doctype html>
<html lang="en-US" data-ng-app="Accordion">
<head>
<meta charset="UTF-8">
<title>AngularJS: Accordion Example with Custom directives</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.5/angular.js"></script>
<style type="text/css">
.expander{ border: 1px solid black; width: 250px; }
.expander>.title{ background: black; color: white; padding: .1em .3em; }
@eyecatchup
eyecatchup / powermailtracking.js
Last active November 19, 2021 06:30
Universal event tracking solution for TYPO3 Powermail XHR submissions.
// Universal event tracking for TYPO3 Powermail XHR submissions.
//
// Note: As of version 4.2.0, Powermail sends a custom event on submit;
// see https://github.com/einpraegsam/powermail/blob/develop/Documentation/Faq/Index.rst#how-can-i-add-a-callback-function-on-ajax-submit
document.addEventListener("DOMContentLoaded", function(event) {
// Step 1
// Attach an onsubmit handler to all powermail ajax forms, which will
// make the powermail form id available in the window object on submit.
var forms = document.querySelectorAll('form');
for (var i in forms) {

ES6 Template Strings 101

Using inline Javascript:
const dog = {
    name: 'Snickers', 
    age: 2 
};
@eyecatchup
eyecatchup / node-cms.md
Last active February 26, 2023 07:47
[WIP] List of Node-based content management systems (CMS)