Skip to content

Instantly share code, notes, and snippets.

View amusarra's full-sized avatar

Antonio Musarra amusarra

View GitHub Profile
@amusarra
amusarra / googletagmanager.js
Last active October 2, 2023 17:52
Google Tag Manager JavaScript block code
<!-- Start Google Tag Manager -->
<script>
var dataLayer = [{ ambiente: 'PROD' }];
</script><!-- Google Tag Manager --><noscript>
<iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript><script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-XXXXXX');
</script>
<!-- End Google Tag Manager -->
@amusarra
amusarra / BIT4ID_miniLector_AIR_NFC_v3.patch
Last active February 10, 2022 09:15
BIT4ID_miniLector_AIR_NFC_v3.patch
diff --git a/readers/supported_readers.txt b/readers/supported_readers.txt
index 5601ded..bfee1c2 100644
--- a/readers/supported_readers.txt
+++ b/readers/supported_readers.txt
@@ -237,6 +237,7 @@
0x25DD:0x3111:Bit4id miniLector
0x25DD:0x3211:Bit4id miniLector AIR EVO
0x25DD:0xB001:Bit4id miniLector Blue
+0x25DD:0x3403:BIT4ID miniLector AIR NFC v3
@amusarra
amusarra / flow_esp32_mqtt_dashboard.json
Last active January 29, 2022 21:04
Node-RED Flow ESP32 MQTT Publish/Subscribe
[
{
"id": "d0c256a4.6e3e48",
"type": "tab",
"label": "ESP32 MQTT Dashboard Environmental Parameters",
"disabled": false,
"info": ""
},
{
"id": "454852c9.ec7f5c",
@amusarra
amusarra / acl_rules_user_esp32_device.json
Created April 4, 2021 23:44
EMQ X Edge 4.2.9 - Add User and ACL (emqx_auth_mnesia module)
[{
"login": "esp32-device",
"topic": "esp32/telemetry_data",
"action": "pub",
"allow": true
},
{
"login": "esp32-device",
"topic": "esp32/telemetry_data",
"action": "sub",
version: '3.3'
services:
apache-ssl-tls-mutual-authentication:
image: amusarra/apache-ssl-tls-mutual-authentication
ports:
- "443:10443"
@amusarra
amusarra / publish_sense_hat_telemetry.py
Last active August 3, 2019 17:29
Raspberry PI Sense HAT: Come pubblicare i dati su CloudAMQP via MQTT
#!/usr/bin/python
# -*- coding: utf-8 -*-
try:
from sense_hat import SenseHat
except ImportError:
from sense_emu import SenseHat
import paho.mqtt.client as paho
import time
@amusarra
amusarra / HasUserRoleNameExpression.php
Last active May 1, 2019 04:50
SugarCRM 7: How to make certain fields readonly
<?php
/**
* Project: SugarCRM Logic Expression for checking User role
* Original Dev: Antonio Musarra, January 2014
* @2009-2014 Antonio Musarra <antonio.musarra[at]gmail.com>
*
* Desc: SugarCRM Logic Expression ext class
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@amusarra
amusarra / sugarcrm-dev-7-1.conf
Created March 9, 2014 21:33
SugarCRM 7.1 NGINX Config File
server {
listen 8090;
server_name sugarcrmdev-71.dontesta.local;
#charset koi8-r;
access_log /var/log/nginx/sugarcrmdev-71.dontesta.local.access.log main;
error_log /var/log/nginx/sugarcrmdev-71.dontesta.local.error.log;
root /home/sugarcrm/application;
index index.php index.html;
@amusarra
amusarra / SugarCRMLoginRestAPI.html
Created April 7, 2014 12:05
SugarCRM REST API - Authentication via JQuery
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SugarCRM Login via REST API</title>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
</head>
<body>
@amusarra
amusarra / addLiferayBundlesToLocalMavenRepository.sh
Last active March 5, 2018 22:50
Add Liferay Bundles to Maven Local Repository
#!/bin/bash
# The MIT License (MIT)
# Copyright (c) 2018 Antonio Musarra's Blog - https://www.dontesta.it
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell