Skip to content

Instantly share code, notes, and snippets.

View Anid4u2c's full-sized avatar
🖥️
Working Remotely

Nick Lalande Anid4u2c

🖥️
Working Remotely
View GitHub Profile
@Anid4u2c
Anid4u2c / metered.ps1
Created August 11, 2020 15:56 — forked from nijave/metered.ps1
Powershell check if on metered network
[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")
@Anid4u2c
Anid4u2c / regex.txt
Created May 1, 2020 05:23 — forked from nerdsrescueme/regex.txt
Common Regex
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 November 9, 2019 20:55 — forked from CodingDoug/README.md
Copying Data from a Google Sheet into Firebase Realtime Database in real time via Apps Script
@Anid4u2c
Anid4u2c / Deploying PWA Starter Kit to Firebase.md
Last active August 28, 2019 01:59 — forked from Dabolus/Deploying PWA Starter Kit to Firebase.md
A enhanced guide that explains how to deploy PWA Starter Kit to Firebase.

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