Skip to content

Instantly share code, notes, and snippets.

View megamen32's full-sized avatar

Demiurge The Single megamen32

View GitHub Profile
@megamen32
megamen32 / GrammarPrac_.floo
Created April 18, 2018 21:52
It seems like working set
{
"url": "https://floobits.com/megamen32/GrammarPrac"
}
@megamen32
megamen32 / main.cpp
Created April 19, 2018 14:42
Fully function Parser
#include <iostream>
#include <map>
#include <strstream>
#include <sstream>
#include <utility>
#include <vector>
#include <deque>
#include <queue>
@megamen32
megamen32 / main.cpp
Created May 2, 2018 12:27
CloseEnough
#include <iostream>
#include <map>
#include <strstream>
#include <sstream>
#include <utility>
#include <vector>
#include <deque>
#include <queue>
#include <unordered_map>
#include <iostream>
#include <sstream>
/*SemanticNode
functer()
{
if (curTok == ARRAY) {
curTok = getToken();
auto it = leaf();
return {Arr + it.str};
} else if (curTok == FUNC) {
#include <iostream>
#include <map>
#include <strstream>
#include <sstream>
#include <utility>
#include <vector>
#include <deque>
#include <queue>
#include <unordered_map>
#include <string>
#include <iostream>
#include <stack>
#include <sstream>
#include "err.hpp"
#include "lexeme.hpp"
#include "syntax.hpp"
using namespace std;
int main()
{
try {
#ifndef LEXEME_HPP
#define LEXEME_HPP
enum LexemeType
{
LSB,
RSB,
END,
IDENT,
ASSIGN,
[{"id":"621fb344.753c4c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"bc1a9021.abe42","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"3c3edf43.a7172","type":"subflow","name":"HA webhook","info":"# Payload:\n\n* json (object containing body json)\n* query (object containing GET parameters)\n* webhook_id (string)\n* data (object containing form data body)","category":"","in":[],"out":[{"x":540,"y":80,"wires":[{"id":"a39b3afc.3ba0f8","port":0}]}],"env":[],"color":"#DDAA99"},{"id":"850e8a37.588a68","type":"server","name":"Home Assistant","addon":true},{"id":"efd2edb2.fa1f6","type":"tls-config","name":"","cert":"/ssl/fullchain.pem","key":"/ssl/privkey.pem","ca":"/ssl/fullchain.pem","certname":"","keyname":"","caname":"","servername":"demiurge.space","verifyservercert":true},{"id":"7ce8991.e39ab68","type":"tls-config","name":"","cert":"","key":"","ca":"","certname":"certificate (1).crt","keyname":"privkey.txt","caname":"certificate_ca (1).crt","servername":"demiurge.space","veri
@megamen32
megamen32 / 1616991834.txt
Created March 29, 2021 04:23
Created with Copy to Gist
curl https://raw.githubusercontent.com/home-assistant/home-assistant-cli/master/docker-hass-cli > hass-cli
$ chmod +x hass-cli
@megamen32
megamen32 / install_as_service.sh
Created July 14, 2023 17:38
install python service with main.py and venv/ as systemctl service with name of name where main.py located
#!/bin/bash
# Use the current directory as default if no argument is provided
DIR=${1:-.}
# Check if the directory exists
if [ ! -d "$DIR" ]; then
echo "Directory does not exist"
exit 1
fi