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 / check-font-if-local-or-hosted.sql
Last active June 26, 2019 11:52
checks if a requested font url (using content-type) is a hosted font (outside) or local (meaning part of the url)
#standardSQL
-- counts the local and hosted fonts
WITH
summary_pages AS (
SELECT * FROM `httparchive.sample_data.summary_pages_desktop_1k`
UNION ALL
SELECT * FROM `httparchive.sample_data.summary_pages_mobile_1k`
),
@tjmonsi
tjmonsi / advanced-medical.sqf
Created October 5, 2018 10:40
Advanced Medical Supplies
_contents=[[],["ACE_packingBandage","ACE_elasticBandage","ACE_tourniquet","ACE_morphine","ACE_adenosine","ACE_atropine","ACE_epinephrine","ACE_plasmaIV","ACE_plasmaIV_500","ACE_plasmaIV_250","ACE_salineIV","ACE_salineIV_500","ACE_salineIV_250","ACE_quikclot","ACE_personalAidKit","ACE_surgicalKit","ACE_bodyBag","adv_aceCPR_AED"],[],[],[[],[]],[[],[]],[[],[]],[[],[]]];_newObject=_this;[_newObject, (_contents select 0), true] call ace_arsenal_fnc_initBox;[_newObject, (_contents select 1), true] call ace_arsenal_fnc_addVirtualItems;[_newObject, (_contents select 2), true] call ace_arsenal_fnc_addVirtualItems;[_newObject, (_contents select 3), true] call ace_arsenal_fnc_addVirtualItems;clearBackpackCargoGlobal _newObject;clearItemCargoGlobal _newObject;clearMagazineCargoGlobal _newObject;clearWeaponCargoGlobal _newObject;_newObject addBackpackCargoGlobal [(_contents select 4) select 0, (_contents select 4) select 1];_newObject addItemCargoGlobal [(_contents select 5) select 0, (_contents select 4) select 1];_newOb
@tjmonsi
tjmonsi / guerilla.sqf
Last active October 5, 2018 10:50
Guerilla SQF
_contents=[["TFAR_anprc155_coyote","MONO_PH_Carryall","MONO_PH_FastPack_Core","B_Messenger_Black_F","B_Messenger_Coyote_F","B_Messenger_Gray_F","B_Messenger_Olive_F"],["U_I_C_Soldier_Bandit_4_F","U_I_C_Soldier_Bandit_1_F","U_I_C_Soldier_Bandit_2_F","U_I_C_Soldier_Bandit_5_F","U_I_C_Soldier_Bandit_3_F","U_C_Man_casual_2_F","U_C_Man_casual_3_F","U_C_Man_casual_1_F","LOP_U_CHR_Villager_01","LOP_U_CHR_Villager_04","LOP_U_CHR_Villager_03","LOP_U_CHR_Villager_02","LOP_U_CHR_Woodlander_01","LOP_U_CHR_Woodlander_02","LOP_U_CHR_Woodlander_03","LOP_U_CHR_Woodlander_04","LOP_U_CHR_Woodlander_05","LOP_U_CHR_Woodlander_06","LOP_U_CHR_Worker_03","LOP_U_CHR_Worker_04","LOP_U_CHR_Worker_01","LOP_U_CHR_Worker_02","LOP_U_CHR_Worker_07","LOP_U_CHR_Worker_05","LOP_U_CHR_Worker_06","U_C_Poloshirt_blue","U_C_Poloshirt_burgundy","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_stripped","U_C_Poloshirt_tricolour","LOP_H_Ushanka","LOP_H_Villager_cap","LOP_H_Worker_cap","TFAR_anprc152","G_Aviator","rhs_balaclava","G_Bala
{
alphabet: {
<methodName>: function()
},
states: {
<stateName>: stateObj
},
transitions: {
<stateNameInitial>: {
next: stateNameNext
@tjmonsi
tjmonsi / index.html
Created July 14, 2018 06:36
Polymer 3 index image-carousel
<html>
<head>
<title>Hello world</title>
<style>
img {
width: 100%
}
</style>
</head>
<body>
@tjmonsi
tjmonsi / image-carousel-tj.js
Created July 14, 2018 06:34
Exercise 1 for Polymer 3
@tjmonsi
tjmonsi / gist:8359e08636eb90598c155bd6f9454f72
Created June 16, 2018 07:03
Copy this code for Polymer Element
import {PolymerElement, html} from '/node_modules/@polymer/polymer/polymer-element.js';
class ImageCarousel extends PolymerElement {
static get properties() {
return {
selected: {
type: Object,
observer: '_selectedChanged'
}
};
_contents = [["rhsusf_assault_eagleaiii_ucp","tf_rt1523g_big_bwmod_tropen","rhs_m2_gun_bag","RHS_M2_Tripod_Bag","RHS_M2_MiniTripod_Bag","rhs_M252_Gun_Bag","rhs_M252_Bipod_Bag"],
["ACE_fieldDressing","ACE_bloodIV","ACE_bloodIV_250","ACE_bloodIV_500","//ACE_elasticBandage","//ACE_quikclot","//ACE_packingBandage","//ACE_salineIV","//ACE_salineIV_250","//ACE_salineIV_500","//ACE_tourniquet","ACE_epinephrine","ACE_morphine","//ACE_adenosine","//ACE_Atropine","//ACE_personalAidKit","//ACE_surgicalKit","ACE_bodyBag","//ACE_plasmaIV","//ACE_plasmaIV_250","//ACE_plasmaIV_500","tf_anprc152","//Leupold_Mk4","ACE_Vector","//ACE_ATragMX","//ACE_Kestrel4500","ACE_RangeCard","//ACE_DAGR","//ACE_SpottingScope","//ACE_Tripod","//Laserdesignator","//Laserbatteries","ACE_RangeTable_82mm","Binocular","ACE_CableTie","ItemCompass","ACE_DefusalKit","ACE_EarPlugs","ACE_EntrenchingTool","ACE_wirecutter","ACE_SpraypaintGreen","ACE_IR_Strobe_Item","ACE_Clacker","ACE_Flashlight_XL50","ItemMap","ACE_MapTools","ACE_microDAGR",
<location-lite></location-lite>
<router-lite>
<route-data-lite route="/"></route-data-lite>
<route-data-lite route="/one"></route-data-lite>
<route-data-lite route="/two"></route-data-lite>
</router-lite>
<template-loader-lite>
<template pattern="/">
<div>
Change of Properties, Properties Change based on Attributes, Nummber of Properties >= 5, Properties are not primitive, No Shadow DOM, Static shadow DOM, Dynamic Shadow
ElementLiteBase Yes Yes Yes Yes Yes No No
HTMLElement (vanilla / smart) Yes No No No Yes No No
HTMLElement/ElementLiteBase Yes Yes No No Yes No No
ElementLiteBase (smart) Yes No No/Yes Yes Yes No No
HTMElement (vanilla / dumb) Yes