Skip to content

Instantly share code, notes, and snippets.

Avatar
🖥️
Working Remotely

Nick Lalande Anid4u2c

🖥️
Working Remotely
View GitHub Profile
@Anid4u2c
Anid4u2c / metered.ps1
Created Aug 11, 2020 — forked from nijave/metered.ps1
Powershell check if on metered network
View metered.ps1
[void][Windows.Networking.Connectivity.NetworkInformation, Windows, ContentType = WindowsRuntime]
$cost = [Windows.Networking.Connectivity.NetworkInformation]::GetInternetConnectionProfile().GetConnectionCost()
$cost.ApproachingDataLimit -or $cost.OverDataLimit -or $cost.Roaming -or $cost.BackgroundDataUsageRestricted -or ($cost.NetworkCostType -ne "Unrestricted")
View regex.txt
Perl and PHP Regular Expressions
PHP regexes are based on the PCRE (Perl-Compatible Regular Expressions), so any regexp that works for one should be compatible with the other or any other language that makes use of the PCRE format. Here are some commonly needed regular expressions for both PHP and Perl. Each regex will be in string format and will include delimiters.
All Major Credit Cards
This regular expression will validate all major credit cards: American Express (Amex), Discover, Mastercard, and Visa.
//All major credit cards regex
'/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6011[0-9]{12}|622((12[6-9]|1[3-9][0-9])|([2-8][0-9][0-9])|(9(([0-1][0-9])|(2[0-5]))))[0-9]{10}|64[4-9][0-9]{13}|65[0-9]{14}|3(?:0[0-5]|[68][0-9])[0-9]{11}|3[47][0-9]{13})*$/'
@Anid4u2c
Anid4u2c / README.md
Created Nov 9, 2019 — forked from CodingDoug/README.md
Copying Data from a Google Sheet into Firebase Realtime Database in real time via Apps Script
View README.md
@Anid4u2c
Anid4u2c / Deploying PWA Starter Kit to Firebase.md
Last active Aug 28, 2019 — forked from Dabolus/Deploying PWA Starter Kit to Firebase.md
A enhanced guide that explains how to deploy PWA Starter Kit to Firebase.
View Deploying PWA Starter Kit to Firebase.md

Note: The original guide, linked from the PWA Starter Kit docs provides step-by-step instructions on how to configure "Firebase Hosting + Firebase Functions" to allow deployment of the PWA Starter Kit, using a manual approach. This guide attempts to correct, simplify, and/or update the original by making use of the Firebase CLI.

If you already have some Firebase knowledge, you might want to checkout the Firebase branch on the PWA Starter Kit repo, that already contains the files and folders completed by following the [original guide](https://gist.github.com/Dabolus/314bd939959ebe68f57f1dc