Skip to content

Instantly share code, notes, and snippets.

View chrfs's full-sized avatar
🎯
Focusing

chr chrfs

🎯
Focusing
View GitHub Profile
@chrfs
chrfs / loadFontAwesomeIcons.js
Last active December 26, 2018 18:36
VueJS FontAwesomeIcon load all Icons
import Vue from 'vue'
import { library } from '@fortawesome/fontawesome-svg-core'
import * as faIconsSolid from '@fortawesome/free-solid-svg-icons'
import * as faIconsRegular from '@fortawesome/fontawesome-free-regular'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
const loadFontAwesomeIcons = (fontAwesomeIcons) => {
Object.keys(fontAwesomeIcons).forEach(faIconName => {
if (faIconName.startsWith('fa') && fontAwesomeIcons[faIconName].iconName) {
library.add(fontAwesomeIcons[faIconName])
@chrfs
chrfs / shop-domain.com.conf
Last active December 26, 2018 12:10
Prestashop Docker NGINX Configuration for a NGINX-Reverse-Proxy
server {
listen 80;
server_name shop-domain.com;
# Proxy for ACME-Challenges
location ^~ /.well-known/acme-challenge {
allow all;
proxy_pass http://acme-upstream$uri;
}
@chrfs
chrfs / cloudSettings
Last active March 25, 2019 10:38
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-03-25T10:37:58.785Z","extensionVersion":"v3.2.7"}
@chrfs
chrfs / dynamic-vue-routes.js
Last active February 5, 2018 10:02
Dynamic generated and required routes with Vue-Router
import VueRouter from 'vue-router';
import config from './example-config';
// Please notice that every Vue-Component is exporting a meta object with a title in my instance:
// exports default {};
// exports meta {
// title: 'example',
// ...
// };
// generate routes
@chrfs
chrfs / header.vue
Last active January 21, 2018 14:36
Generate header navigation with Vue-Router
<template>
<header id="header">
<ul id="header__nav--list">
<li v-for="(item, itemKey) in items" :key="itemKey"><router-link :to="item.path" exact>{{item.name}}</router-link></li>
</ul>
</header>
</template>
<script>
export default {