Skip to content

Instantly share code, notes, and snippets.

Avatar
😋
Focusing

chr chrfs

😋
Focusing
View GitHub Profile
@chrfs
chrfs / loadFontAwesomeIcons.js
Last active Dec 26, 2018
VueJS FontAwesomeIcon load all Icons
View loadFontAwesomeIcons.js
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 Dec 26, 2018
Prestashop Docker NGINX Configuration for a NGINX-Reverse-Proxy
View shop-domain.com.conf
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 Mar 25, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-03-25T10:37:58.785Z","extensionVersion":"v3.2.7"}
@chrfs
chrfs / dynamic-vue-routes.js
Last active Feb 5, 2018
Dynamic generated and required routes with Vue-Router
View dynamic-vue-routes.js
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 Jan 21, 2018
Generate header navigation with Vue-Router
View header.vue
<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 {