Skip to content

Instantly share code, notes, and snippets.

View Robert-96's full-sized avatar

Dezmerean Robert Robert-96

View GitHub Profile
@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 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 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 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 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 / 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 / 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) {