Init:
gotk bootstrap github \
--owner=gitopsrun \
--repository=fleet-infra \
--branch=main \
--team=dev \
var arr = [ | |
{count:20, type:'a'}, | |
{count:19, type:'b'}, | |
{count:8, type:'c'}, | |
{count:34, type:'d'} | |
]; | |
var expanded = arr.reduce(function(value, d){ | |
var l = new Array( Number(d.count) ) | |
for(var i=0;i<d.count;i++){ |
" Vim Color File | |
" Name: onedark.vim | |
" Maintainer: https://github.com/joshdick/onedark.vim/ | |
" License: The MIT License (MIT) | |
" Based On: https://github.com/MaxSt/FlatColor/ | |
" A companion [vim-airline](https://github.com/bling/vim-airline) theme is available at: https://github.com/joshdick/airline-onedark.vim | |
" +-----------------+ | |
" | Color Reference | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: debug | |
name: debug | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
##How to check file integrity with shasum
For verifying the integrity (but not authenticity of data, i.e., who authored it or the origin of the file) of a file, it is necessary to run a checksum function on the file which will output a value and compare it to a previously stored checksum value; if it matches we can be relatively confident that the file hasn't been tampered with or altered.
You might be asked to verify a file's sha1sum or sha2sum–all this means is calculating and verifying the cryptographic sha1 or sha2 hash value or digest included in the file.
###Various commands and methods for verifying shasum 1 or 2:
Organic:
In terminal run:
abc 1 2 3 | |
def 4 5 6 | |
ga 7 9 10 | |
hij 1 5 99 |
Test your website and find out how it reacts if Surf 100 users at the same time and load your webpage with 10 requests each.
-n
requests
Number of requests to perform for the benchmarking session. The default is to just perform a single request which usually leads to non-representative benchmarking results.
Step by step how to pull a private DockerHub hosted image in a Kubernetes YML. | |
export DOCKER_REGISTRY_SERVER=https://index.docker.io/v1/ | |
export DOCKER_USER=Type your dockerhub username, same as when you `docker login` | |
export DOCKER_EMAIL=Type your dockerhub email, same as when you `docker login` | |
export DOCKER_PASSWORD=Type your dockerhub pw, same as when you `docker login` | |
kubectl create secret docker-registry myregistrykey \ | |
--docker-server=$DOCKER_REGISTRY_SERVER \ | |
--docker-username=$DOCKER_USER \ |
#!/usr/bin/python3 | |
import cmd, json, sys, traceback | |
from collections import defaultdict | |
from dataclasses import dataclass | |
from typing import List, Dict | |
import requests | |
# This is part of Suhail's talk on the Infrastructure and Ops Superstream | |
# track for O'Reilly |
Most recently tested on macOS Sierra (10.12.6)
curl https://bootstrap.pypa.io/get-pip.py -o ~/Downloads/get-pip.py
--user
flag; python ~/Downloads/get-pip.py --user
. pip will be installed to ~/Library/Python/2.7/bin/pip~/Library/Python/2.7/bin
is in your $PATH
. For bash
users, edit the PATH=
line in ~/.bashrc
to append the local Python path; ie. PATH=$PATH:~/Library/Python/2.7/bin
. Apply the changes, source ~/.bashrc
.--user
when installing modules; ie. pip install <package_name> --user