Skip to content

Instantly share code, notes, and snippets.

View tomboolean's full-sized avatar

Atom Boolean tomboolean

  • Decision Tree AI
  • Arizona
View GitHub Profile
module.rules = {
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto',
resolve: {
fullySpecified: false
}
}
mix.options({
@tomboolean
tomboolean / serializers.py
Created January 22, 2022 06:15
NetsapiensCallSubscriptionPayloadSerializer
from rest_framework import serializers
class NetsapiensCallSubscriptionPayloadSerializer(serializers.Serializer):
hostname = serializers.CharField() # core1-phx.peerlogic.com
sessionId = serializers.CharField() # 20220119004825004744
orig_callid = serializers.CharField() # 0_1063160652@192.168.168.127
orig_leg_tag = serializers.CharField() # Om7pAVCOHJLGixtIA1FA2E
orig_ip = serializers.CharField() # 98.174.249.67
orig_match = serializers.CharField() # sip:1110@pleasantdental-peoria
orig_sub = serializers.CharField() # 1110

Git branch to use off of main or development:

git checkout -b app-engine - this way you can test it out in the resulting Cloud Build trigger.

Setting up a GCP Project

  1. Google Cloud Platform provides a list of instructions for creating a project here: GCP's Instructions for Creating a Project The following list are notes that correspond to specific steps in the process listed in the link.

Name the project peerlogic-api-, such as peerlogic-api-dev and peerlogic-api-demo. In the Location field, Place it into the corresponding folder location (peerlogic-dev or peerlogic-demo, etc.) This is how we are organizing environment resources.

  1. Please note that there can be a time lag between the time that you create a project and when it actually appears in the list of available projects for your organization. For example, your project may appear in the list of your recent projects in your account yet a c

Dependencies

Install GCP Dependencies to your local machine:

Save kustomize with executable permissions.

GKE ships with kubernetes version 1.19 in gcloud installation, which means it ships with kustomize version 2.0.3 at the time of this writing:

@tomboolean
tomboolean / kustomize.bash
Created August 26, 2021 22:38
Use different customize version in gcp???
git clone https://github.com/GoogleCloudPlatform/cloud-builders-community
cd cloud-builders-community/kustomize
gcloud builds submit --config cloudbuild.yaml --substitutions "_KUSTOMIZE_VERSION=v4.2.0" .
gcloud container images list --filter kustomize
Electron-builder [11:14:09 PM]
│ • electron-builder version=22.10.5 os=10.0.17763
│ • loaded configuration file=C:\Users\Administrator\git\peerlogic-callpop-app\builder.config.js
│ • rebuilding native dependencies dependencies=keytar@7.7.0 platform=win32 arch=x64
│ • install prebuilt binary name=keytar version=7.7.0 platform=win32 arch=x64
│ • build native dependency from sources name=keytar
│ version=7.7.0
// environment variables
const fs = require('fs');
fs.copyFile(`${__dirname}/../electron-builder.env`, `${__dirname}/../src/renderer/.env`, (err) => {
if (err) throw err;
console.log('Enviroment file was copied to nuxt renderer');
});
const { ipcMain, session } = require('electron')
ipcMain.on('loggedIn', function persistLogin (event, credentials) {
console.log('logged in - in main')
session.defaultSession.cookies.set({ url: 'https://app.peerlogic.com', name: 'auth', value: credentials }, function (error) {
console.log(error)
})
})
@tomboolean
tomboolean / Recognized.vue
Created January 14, 2021 23:03
recognized number popup
<template>
<v-flex>
<v-avatar color="secondary" absolute :style="{left: '50%', transform:'translateX(-50%)'}">
<img
style="max-width: 30px; max-height: 30px;"
src="~assets/peerlogic-squarelogo.png"
>
</v-avatar>
<v-card class="mx-auto" max-width="434" tile>
<v-container class="screen-pop">
<template>
<conversation :messages="messages" conversation-type="chat" height="100vh" />
<emoji-picker :show="emojiPanel" @close="toggleEmojiPanel" @click="addEmojiToMessage"></emoji-picker>
</template>