Skip to content

Instantly share code, notes, and snippets.

View ShayCichocki's full-sized avatar
🌝

Shay Cichocki ShayCichocki

🌝
View GitHub Profile
const https = require('https');
const yourWebHookURL = ''; // PUT YOUR WEBHOOK URL HERE
const slackMessage = {
'text': 'your message here',
};
function sendSlackMessage (webhookURL, messageBody) {
try {
messageBody = JSON.stringify(messageBody);
@ShayCichocki
ShayCichocki / bnf-story-parser-fixed.php
Created October 24, 2017 01:06
BNF form parser, exampled with story generating bnf
<?php
class BNFParserGenerator {
private $defs = [];
/**
* This converts the BNF string into a set of generator definitions
* that we can use later
* @param string $string
@ShayCichocki
ShayCichocki / bnf-story-parser.php
Created October 24, 2017 00:59
Bnf parser and story generator
<?php
class BNFParser {
private $unparsedString;
private $defs = [];
public function __construct(string $bnfString = null)
{