Skip to content

Instantly share code, notes, and snippets.

View Robert-96's full-sized avatar
🔧
Working on @altwalker

Dezmerean Robert Robert-96

🔧
Working on @altwalker
View GitHub Profile
@Robert-96
Robert-96 / example.js
Created March 13, 2022 21:40
Pure JS debouncing example
function delay(callback, ms) {
var timer = 0;
return function() {
clearTimeout(timer);
timer = setTimeout(callback, ms);
};
};
document.getElementById('input').addEventListener(delay(function (event) {
@Robert-96
Robert-96 / model.json
Last active January 11, 2021 13:39
AltWalker - Requirements Example Model
{
"name": "Requirements Example",
"models": [
{
"name": "ModelName",
"generator": "random(vertex_coverage(100))",
"startElementId": "v0",
"vertices": [
{
"id": "v0",
@Robert-96
Robert-96 / README.md
Last active December 13, 2020 21:46
WIP: RegEx Cheat Sheet

RegEx Cheat Sheet

POSIX Character Classes

Character Class Description
[:alnum:] The alphanumeric characters. In ASCII, equivalent to: [A-Za-z0-9].
[:word:] The same as [:alnum:], with the addition of the underscore (_) character.
[:blank:] The space and tab characters.
[:digit:] The numerals 0 through 9.
@Robert-96
Robert-96 / README.md
Last active July 12, 2022 21:55
ANSI Color Sequences

ANSI Escape Sequences

ANSI escape sequences are a standard for in-band signaling to control cursor location, color, font styling, and other options on terminals.

Constants

Add ANSI Escape Sequences to style your output in different colors and formats using a set of predefined variables.

#!/bin/sh
@Robert-96
Robert-96 / README.md
Last active January 20, 2021 14:36
WIP: VIM Cheat Sheet

VIM Cheat Sheet

Commands

Commnad Description
:q quit (fails if there are unsaved changes)
:q! quit and throw away unsaved changes
:w write (save) the file
:wq write (save) the file and exit
@Robert-96
Robert-96 / README.md
Last active October 24, 2022 19:30
Add meta tags for social media with HtmlWebpackPlugin

Add meta tags for social media with HtmlWebpackPlugin

Social media meta tags are <meta> tags in the <head> of your web page that control how URLs are displayed when shared on social media.

If you are using webpack you can use the meta option from the HtmlWebpackPlugin to add the social meta meta tags to your web page:

// webpack.config.js
@Robert-96
Robert-96 / README.md
Last active August 20, 2020 22:00
Deploy an Ember.js app on GitHub Pages with TravisCI

Ember.js: Deploy your app on GitHub Pages with TravisCI

You can use Travis CI to deploy your Ember app to GitHub Pages after a successful build.

Using TravisCI over ember-cli-github-pages has the advantage of automatically deploying the app for every change pushed to the master branch.

Modify your .travis.yml file

For a minimal configuration, update your .travis.yml file:

@Robert-96
Robert-96 / README.md
Last active February 13, 2024 15:24
Get URL Parameters with JavaScript

Get URL Parameters with JavaScript

URL Parameters (Query Parameters) are a set o key value pars attached to the end of a url. They are used to send small amounts of data from page to page, or from client to server via a URL.

TL;DR

const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
@Robert-96
Robert-96 / README.md
Last active April 2, 2023 16:50
Github Markdown Cheat Sheet
@Robert-96
Robert-96 / README.md
Last active July 22, 2020 18:55
Ember.Js: Build a Markdown component with ShowdownJs

Ember.Js: Build a Markdown component with ShowdownJs

With the help of ShowdownJs and HighlightJs you can build an Markdown component with syntax highlighting.

ShowdownJs is an easy to use Markdown to HTML converter, it can be used in both client side (browser) or server side (with nodejs).

HighlightJs is an JavaScript library for syntax highlighting on the web. It supports 189 languages and 94 styles.