Skip to content

Instantly share code, notes, and snippets.

View raynoppe's full-sized avatar

Ray Noppe raynoppe

View GitHub Profile
@raynoppe
raynoppe / vuerouter.js
Last active June 30, 2020 15:11
Vue Code
// router
this.$router.push({ name: 'analytics' });
this.$router.push({ path: '/path' });
const currentroute = this.$router.currentRoute;
const currentroute = this.$router.currentRoute.path;
@click="(var) ? var=false:var=true"
<template v-html="html_text"></template>
@raynoppe
raynoppe / neotrack.js
Created February 14, 2020 13:37
Neo Tracking
<script>
const NeoData = { user: 'neouser', site: 'siteid', track: [], tempaction: {} }
</script>
<script src="https://app.neoonline.live/v1/neo.js" type="text/javascript"></script>
@raynoppe
raynoppe / jss.js
Last active May 25, 2020 10:13
JS Misc
const oldPackage = JSON.parse(JSON.stringify(this.package)); // copy object
setTimeout(() => {}, 1000);
// Arrays
array.splice(pos, 1); // Removes the first element of the array
// clone array
let arr2 = [...arr];
@raynoppe
raynoppe / queries.js
Created February 19, 2020 09:45
DNE api queries
// all queries require the auth token to be sent
// get all parent goals
const parentgoals = this.axiosget("/goals/parents");
@raynoppe
raynoppe / cocktailfunctions.js
Last active July 28, 2020 05:54
Cocktail Functions
prfs.sendmessage(subject, type, html, text, to);
const mailOptions = {
from: 'dne.life <[email protected]>',
// replyTo: frommail,
to: inbound.nr.email,
subject: `${slottype} confirmation`,
text: textm,
html: cn7,
attachments: [
@raynoppe
raynoppe / cigal.html
Created April 6, 2020 09:32
Cigal Tracking code
<script>
const NeoData = { user: '5defc7bf5e3ae312e40d75ac', site: '5df368d93b1f3c743b1b3239', track: [], tempaction: {} }
</script>
<script src="https://app.neoonline.live/v1/neo.js" type="text/javascript"></script>
@raynoppe
raynoppe / node-functions.js
Last active August 25, 2020 09:36
Node functions
Kill all open processes
// Kill method 2
ps -ef | grep node
2617 u0_a171 0:04 /data/data/com.termux/files/usr/bin/node app.js
3341 u0_a171 0:00 grep node
kill 2617
// Upgrade node mac using home-brew
@raynoppe
raynoppe / node-pdf-creator.js
Created May 25, 2020 10:44
node pdf creator
const fs = require('fs');
var pdf = require("pdf-creator-node");
var moment = require('moment');
var appRoot = require('app-root-path');
// read html file
var html = fs.readFileSync('./includes/orderpdf.html', 'utf8');
var options = {
format: "A4",
@raynoppe
raynoppe / clientscolors.css
Created January 18, 2021 15:42
Clients colours
.jams {
background: #015488;
}
@raynoppe
raynoppe / wapplerf7.html
Last active January 20, 2021 14:03
Wappler F7 elements
<div class="block-title">Block Title</div>
<div class="block">
<div class="block-header">Block Header</div>
<p>Block content</p>
<div class="block-footer">Block Footer</div>
</div>
<div class="card card-outline">
<div class="card-header">Header</div>
<div class="card-content card-content-padding">