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 / 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: 😄

@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 / 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;
<?php
/**
* @author Spiff Jekey-Green (spiffjekeygreen@gmail.com)
* @copyright MIT
*/
class DB {
public $db_host;
public $db_user;
@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();
@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 / 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 / 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 / ImageToAsciiText.js
Created April 28, 2022 06:46
Image pixel manipulation
/*
* @description An image to ascii text conversion library
*/
class ImageToAscii {
constructor(image) {
this.image = image;
this.toText = this.toText.bind(this);
}
@SpiffGreen
SpiffGreen / ArrayCombination.js
Created May 2, 2022 14:59
A code snippet to produce permutation of an array
const test_array = [1, 2, 3];
function get_combinations(arr) {
var permArr = [],
usedChars = [];
function permute(input) {
var i, ch;
for (i = 0; i < input.length; i++) {
ch = input.splice(i, 1)[0];
usedChars.push(ch);