- local https://github.com/kubernetes-sigs/kind (or just use minikube if it works for you)
- cloud https://cloud.google.com/kubernetes-engine (for PersistentVolume and Ingress, I needed to try the real deal)
- practice environment: https://github.com/arush-sal/cka-practice-environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$NS="NameSpace"; $Pattern="amass"; & kubectl get pods -n $NS | % {"$_" -Split " "} | Select-String -Pattern $Pattern | %{ & kubectl delete -n $NS pod $_ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "test" | |
version = "0.1.0" | |
authors = ["YOU <YOU@users.noreply.github.com>"] | |
edition = "2018" | |
[lib] | |
crate-type = ["cdylib"] |
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 7 columns, instead of 6 in line 5.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
,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 |
| HEADER | EMPHASIS | HORIZONTAL_LINE | LIST | TABLE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
As configured in my dotfiles.
start new:
tmux
start new with session name:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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})*$/' |
NewerOlder