Skip to content

Instantly share code, notes, and snippets.

View SpiffGreen's full-sized avatar
:octocat:
Available

Spiff Jekey-Green SpiffGreen

:octocat:
Available
View GitHub Profile
@SpiffGreen
SpiffGreen / setup_video_feature.sh
Created April 2, 2022 05:29
Things to do after a new ubuntu installation
sudo apt install libdvdnav4 libdvd-pkg gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libdvd-pkg
sudo apt install ubuntu-restricted-extras
@SpiffGreen
SpiffGreen / ast-to-html.js
Last active August 25, 2021 22:28
A simple implementation of ast-to-html and html-to-ast algorithms
const { htmlToAST, toks } = require("./html-to-ast");
const SELF_CLOSING_TAG = "SELF_CLOSING_TAG";
const OPENING_TAG = "OPENING_TAG";
const TEXT_ELEMENT = "TEXT_ELEMENT";
function astToHTML(ast) {
const start = "<" + ast.TagName + ">";
let mid = "";
const end = "</" + ast.TagName + ">";
@SpiffGreen
SpiffGreen / simple_markdown_parse.js
Created July 28, 2021 02:18
A simple function that evaluates and produces html from markdown
/**
* @description A simple function to parse markdown code into HTML
*/
const parseMarkdown = (str) => str.replace(/^# (.*$)/gim, "<h1>$1</h1>")
.replace(/^## (.*$)/gim, "<h2>$1</h2>")
.replace(/^### (.*$)/gim, "<h3>$i</h3>")
.replace(/^#### (.*$)/gim, "<h4>$i</h4>")
.replace(/^##### (.*$)/gim, "<h5>$i</h5>")
.replace(/^###### (.*$)/gim, "<h6>$i</h6>")
@SpiffGreen
SpiffGreen / app.js
Created July 25, 2021 00:41
A simple rule-based chatbot developed with javascript
const bot = require("./training");
console.log("Hello I'm Bujo. Let's Talk :)");
bot.converse();
<?php
/**
* @author Spiff Jekey-Green ([email protected])
* @copyright MIT
*/
class DB {
public $db_host;
public $db_user;
@SpiffGreen
SpiffGreen / LexGen.js
Created July 9, 2021 02:14
A simple regular expression based lexer generator
/**
* @description A simple lexer generator in javascript
*/
class LexToken {
constructor(name, value, index, row, col) {
this.name = name;
this.value = value;
this.index = index;
this.line = row;
@SpiffGreen
SpiffGreen / mysqltest.php
Created July 7, 2021 20:02
A simple CRUD API test with mysql implemented in php
<?php
header("Content-Type:application/json");
$dbhost = "DB_HOST";
$dbuser = "DB_USER";
$dbpass = "PASSWORD";
$db = "TABLE";
$conn = new mysqli($dbhost, $dbuser, $dbpass, $db);
@SpiffGreen
SpiffGreen / README.md
Created May 24, 2021 00:38 — forked from roachhd/README.md
EMOJI cheatsheet ๐Ÿ˜›๐Ÿ˜ณ๐Ÿ˜—๐Ÿ˜“๐Ÿ™‰๐Ÿ˜ธ๐Ÿ™ˆ๐Ÿ™Š๐Ÿ˜ฝ๐Ÿ’€๐Ÿ’ข๐Ÿ’ฅโœจ๐Ÿ’๐Ÿ‘ซ๐Ÿ‘„๐Ÿ‘ƒ๐Ÿ‘€๐Ÿ‘›๐Ÿ‘›๐Ÿ—ผ๐Ÿ”ฎ๐Ÿ”ฎ๐ŸŽ„๐ŸŽ…๐Ÿ‘ป

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. โœˆ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: ๐Ÿ˜„