Skip to content

Instantly share code, notes, and snippets.

View tjmonsi's full-sized avatar

Toni-Jan Keith Monserrat tjmonsi

View GitHub Profile
@tjmonsi
tjmonsi / app.js
Created December 15, 2021 05:44
Full app.js v1
// Require the framework and instantiate it
import fastify from 'fastify';
import stat from 'fastify-static';
import jwt from 'fastify-jwt';
import cookie from 'fastify-cookie';
import session from 'fastify-session';
import openApiGlue from 'fastify-openapi-glue';
import swagger from 'fastify-swagger';
import sensible from 'fastify-sensible';
import { Service } from './services/index.js';
@tjmonsi
tjmonsi / app.js
Created December 15, 2021 05:43
App JS for fastify
import stat from 'fastify-static';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
import { readFileSync } from 'fs';
// ...
app.register(stat, {
root: join(dirname(fileURLToPath(import.meta.url)), './public'),
preCompressed: true
@tjmonsi
tjmonsi / index.html
Created December 15, 2021 05:36
Public index
<html>
<head>
<title>
This is my Blog
</title>
</head>
<body>
<web-header></web-header>
@tjmonsi
tjmonsi / package.json
Created December 15, 2021 05:21
Full package.json
{
"name": "cmsc100ay21s1-backend",
"version": "0.0.1",
"description": "cmsc100ay21s1-backend",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npm-run-all --parallel server webpack",
"server": "nodemon index",
@tjmonsi
tjmonsi / webpack.config.cjs
Created December 15, 2021 05:15
Simple Webpack Config
const { resolve } = require('path');
module.exports = {
entry: './src/index.js',
output: {
path: resolve(__dirname, 'src/public'),
filename: 'script.js'
},
module: {
rules: [
@tjmonsi
tjmonsi / gist:6cf9fa3efe846f3402484b8a67b7e2f2
Created November 10, 2020 13:54
Philarpat AR Standard
[["rhs_weap_m249_light_L","","ACE_acc_pointer_green","optic_ERCO_blk_F",["rhsusf_200rnd_556x45_mixed_box",200],[],"rhsusf_acc_grip4_bipod"],[],["rhsusf_weap_glock17g4","","acc_flashlight_pistol","",["rhsusf_mag_17Rnd_9x19_JHP",17],[],""],["a3phuniform_philarpat_f",[["ACE_elasticBandage",5],["ACE_packingBandage",5],["ACE_quikclot",5],["ACE_CableTie",5],["ACE_EarPlugs",2],["ACE_Flashlight_XL50",1],["ACE_MapTools",1],["ACE_tourniquet",2],["rhsusf_mag_17Rnd_9x19_JHP",2,17]]],["cpc_Fast_philarpat",[["ACE_splint",2],["ACE_IR_Strobe_Item",5],["ACE_SpraypaintBlue",1],["ACE_SpraypaintBlack",1],["ACE_SpraypaintRed",1],["ACE_SpraypaintGreen",1],["rhs_mag_mk84",2,1],["rhs_mag_m67",2,1],["rhs_mag_an_m8hc",2,1],["SmokeShellGreen",1,1],["SmokeShellYellow",1,1],["SmokeShellOrange",1,1],["SmokeShellPurple",1,1],["SmokeShellBlue",1,1],["SmokeShellRed",1,1]]],["a3ph_fastpack_philarpat",[["ACE_salineIV_500",1],["rhsusf_200rnd_556x45_mixed_box",2,200]]],"a3ph_ech_philarpat","",["Binocular","","","",[],[],""],["ItemMap","","TFAR_a
@tjmonsi
tjmonsi / gist:7766b0042e36716c9b4d185c2f704b90
Created November 10, 2020 13:26
Create a loadout text
_text = “<CHANGE-TEXT-HERE>”;
_loadout = //paste-the-clipboard-here
_this addAction
[
format [“Load %1”, _text],
{
params ["_target", "_unit", "_actionId", "_arguments"];
_arguments params ["_loadout"];
- crowd
- data
- $domainId
- $deploymentId
- $crowdId
- name
- demographics
- domainId
- deploymentId
- lists
{
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse",
"hostUserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36",
"benchmarkIndex": 1346
},
"lighthouseVersion": "5.7.0",
"fetchTime": "2020-03-23T17:58:41.302Z",
"requestedUrl": "https://www.manulife.com.ph/",
{
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse",
"hostUserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36",
"benchmarkIndex": 1346
},
"lighthouseVersion": "5.7.0",
"fetchTime": "2020-03-23T17:58:41.302Z",
"requestedUrl": "https://www.manulife.com.ph/",