Skip to content

Instantly share code, notes, and snippets.


Fabio Cigliano lidio601

View GitHub Profile
lidio601 / mac_vendors.dart
Last active Mar 2, 2020
API integration for API
View mac_vendors.dart
/// Wrapper around Macvendors API
import 'package:http/http.dart' as http;
import "zmac_address.dart";
const BASE_URL = "";
lidio601 / mac_address.dart
Created Mar 2, 2020
simple function to normalize mac addresses
View mac_address.dart
final d = "([0-9A-F]{2})";
final s = "[:\.-]?";
final RegExp re = RegExp(
multiLine: false,
/// MAC addresses will come in the following shape or form:
lidio601 / loadScript.js
Last active Jan 18, 2020
Load custom script into DOM (with Promise)
View loadScript.js
* Dinamically load script into DOM
* @see
* Example usage:
* {code}
lidio601 /
Created Jan 14, 2020
Google Cloud function to automatically disable new users

Firebase Authentication

Via this Cloud Function you can automatically disable new users.

To deploy this, replace with yours and deploy via command line with:

gcloud functions deploy block-signup --runtime nodejs10 --trigger-event providers/firebase.auth/eventTypes/user.create --trigger-resource <PROJECT-ID>
View logger.js
/* eslint-disable no-console */
import _ from "lodash";
const DEBUG = !process.env.NODE_ENV || process.env.NODE_ENV === "development";
class ConfigHolder {
constructor(initialValue) {
this.value = initialValue;
lidio601 / solution.c
Created Nov 28, 2019
C test to check if a number is prime
View solution.c
#include <stdbool.h>
#ifndef Solution_INCLUDED
#define Solution_INCLUDED
bool IsPrime(int input);
lidio601 /
Last active Oct 2, 2019
React Native app starter kit
# ensure right cli is installed
npm uninstall -g react-native-cli
npm i -g @react-native-community/cli
# create app from template
npx react-native init ${APPNAME} --template react-native-template-typescript
lidio601 / AppDelegate.m
Last active Jul 31, 2019
React Native - native module started kit (iOs)
View AppDelegate.m
// ...
#import "FooModule.h"
// ...
@interface AppDelegate ()
// ...
@property (nonatomic, strong) FooModule *fooModule;
// ...
View fibonacci.js
function fibonacci (n) {
if (n < 1) return 0;
var a = [1, 1];
var sum = 1;
while (n-- > 2) {
sum += a[0];
a = a.slice(1).concat(sum);
return sum;
View update.20181121.log
This file has been truncated, but you can view the full file.
23:19:37 stopping lamassu-server
lamassu-server: stopped
lamassu-admin-server: stopped
23:19:37 archiving old lamassu-server installation located in /usr/lib/node_modules/lamassu-server
tar: Removing leading `/' from member names
removed '/usr/lib/node_modules/lamassu-server/todo.txt'
removed '/usr/lib/node_modules/lamassu-server/.jshintrc'
removed '/usr/lib/node_modules/lamassu-server/currencies.json'
removed '/usr/lib/node_modules/lamassu-server/data-notes.txt'
You can’t perform that action at this time.