Skip to content

Instantly share code, notes, and snippets.

set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
import Vue from 'vue'
import VueSocketio from 'vue-socket.io'
import * as io from 'socket.io-client'
export default {
beforeStart ({ store }) {
if (process.client) {
const url = `localhost:1337`
const opts = {
transports: [ 'websocket', 'polling' ]
import Vue from 'vue'
import VueSocketio from 'vue-socket.io'
import * as io from 'socket.io-client'
export default {
beforeStart ({ store }) {
const { token } = store.state.auth
const socket = {
transports: [ 'websocket', 'polling' ]
}
metaInfo() {
return {
title:
this.unseen > 0
? `(${this.unseen}) Givii | ${this.name}\'s List`
: `Givii | ${this.name}\'s List`,
meta: [
{
name: 'description',
vmid: 'description',
#!/bin/bash
##################################################################
# Settings
# Which Interface do you want to check/fix wlan='wlan0'
# Which address do you want to ping to see if the network interface is alive? pingip='8.8.8.8'
##################################################################
echo "Performing Network check for $wlan"
/bin/ping -c 1 -I $wlan $pingip > /dev/null 2> /dev/null
if [ $? -ge 1 ] ; then
echo "Network connection down! Attempting reconnection."
export default {
plugins: [
'@uvue/server/plugins/serverError',
'@uvue/server/plugins/gzip',
[
'@uvue/server/plugins/static',
{
directory: 'dist',
options: {
immutable: true,
module.exports = {
baseUrl: process.env.CORDOVA_PLATFORM ? '' : '/',
pluginOptions: {
cordovaPath: 'src-cordova'
},
pwa: {
workboxOptions: {
runtimeCaching: [
{
urlPattern: new RegExp('/api'),
export default {
plugins: [
'@uvue/core/plugins/errorHandler',
[
'@uvue/core/plugins/vuex',
{
onHttpRequest: true,
fetch: true
}
],
export default {
beforeCreate ({ router, store, redirect }) {
router.beforeEach((to, from, next) => {
if (to.matched.some(record => record.meta.requiresAuth)) {
if (!store.state.auth.token) {
const redirectPath = `/auth?redirect=${router.currentRoute.path}`
next(redirectPath)
} else {
next()
}
/* eslint-disable no-console */
import { register } from 'register-service-worker'
if ((process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'staging') && process.client) {
register(`${process.env.BASE_URL}service-worker.js`, {
ready() {
console.log(
'App is being served from cache by a service worker.\n' +
'For more details, visit https://goo.gl/AFskqB'