As configured in my dotfiles.
start new:
tmux
start new with session name:
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})*$/' |
As configured in my dotfiles.
start new:
tmux
start new with session name:
class Program { | |
static void Main(string[] args) { | |
var query = "select A.ID, A.NAME from (select ID, NAME from BAR) A where A.ID = '1'"; | |
var parser = new TSql120Parser(false); | |
IList<ParseError> errors; | |
var parsedQuery = parser.Parse(new StringReader(query), out errors); | |
if (errors.Count > 0) { | |
foreach (var err in errors) { | |
Console.ForegroundColor = ConsoleColor.Red; | |
Console.WriteLine(err.Message); |
| HEADER | EMPHASIS | HORIZONTAL_LINE | LIST | TABLE
,Metric,Metric Display Name,Unit,Aggregation Type,Description,Dimensions | |
1, azure.analysisservices_servers.qpu_metric,QPU,Count,Average," Microsoft.AnalysisServices/servers: QPU. Range 0-100 for S1, 0-200 for S2 and 0-400 for S4",ServerResourceType | |
2, azure.analysisservices_servers.memory_metric,Memory,Bytes,Average," Microsoft.AnalysisServices/servers: Memory. Range 0-25 GB for S1, 0-50 GB for S2 and 0-100 GB for S4",ServerResourceType | |
3, azure.analysisservices_servers.total_connection_requests,Total Connection Requests,Count,Average, Microsoft.AnalysisServices/servers: Total connection requests. These are arrivals.,ServerResourceType | |
4, azure.analysisservices_servers.successfull_connections_per_sec,Successful Connections Per Sec,CountPerSecond,Average, Microsoft.AnalysisServices/servers: Rate of successful connection completions.,ServerResourceType | |
5, azure.analysisservices_servers.total_connection_failures,Total Connection Failures,Count,Average, Microsoft.AnalysisServices/servers: Total failed connection |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# ------------------------------------------------------------------------------- | |
# - | |
# Python dual-logging setup (console and log file), - | |
# supporting different log levels and colorized output - | |
# - | |
# Created by Fonic <https://github.com/fonic> - | |
# Date: 04/05/20 - 02/07/23 - |
$NS="NameSpace"; $Pattern="amass"; & kubectl get pods -n $NS | % {"$_" -Split " "} | Select-String -Pattern $Pattern | %{ & kubectl delete -n $NS pod $_ } |