Skip to content

Instantly share code, notes, and snippets.

View pingles's full-sized avatar

Paul Ingles pingles

View GitHub Profile
#import <iostream>
#import <set>
// Our input will be a file containing a list of unsorted numbers.
// We need to find two entries that sum to 2020, multiply them, and return the value.
//
// Simple:
// We compare each number against each other number, this would be O(n^2)
//
// Complex:
@pingles
pingles / public.txt
Created April 8, 2018 22:31
pingles@pm.me
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v3.0.5
Comment: https://openpgpjs.org
xsBNBFrKl5wBCAC+B+QnqBCZoQaDlytpZuY6E/V8JIMDqs8qzfd70zi3vnhW
l+hvGWQeZmhwLTDOm05IfdsXkb0FJcDGZBXzeT1PCO+gNRs5KkzXOnuwMA1N
SEL1dJ0R+gqVNr/1jSKG2SsSdUKhNeYof+OgHz/TRZBCHKgMbd5khl8t5VO5
f7ZGQ0LJVwkeNHwQeYf1iJRrARtn0FwqeMyrxL6nq3A+htzUbfHxHNxsjUBg
UvNhOEYBiRm7pWsg1hwXv+4bJZQvENRewFmQhLoHuv3TQGM+YTgK7drMXizC
vw4doDGV1A3sunQxJzyRrF4auXm8fLQMw3mNnG53bOHVbK6cI9WiZnLRABEB
@pingles
pingles / CONTACT.md
Last active March 11, 2021 16:36
Contacting me

My email address is: paul@pingles.org

To email me securely you can use my public key below:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v2.5.8
Comment: https://openpgpjs.org

xsBNBFn1BswBCAC9fkU4/7ubekoObJ0FcCVLME6JQhQo7Hi/Gny4csDMKul9
$ kn describe hpa autoscale-demo
Name: autoscale-demo
Namespace: cloud
Reference: Deployment/autoscale-demo
Metrics: ( current / target )
"qps" on pods: <unknown> / 1
Min replicas: 1
Max replicas: 5
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
require 'rubygems'
require 'bundler/setup'
require 'sidekiq'
require 'sidekiq/api'
Sidekiq.configure_server do |server|
config.redis = {url: ENV["REDIS_URL"] || "redis://localhost:6379/12"}
end
workers = Sidekiq::ProcessSet.new.size
---------------------- ATU-R Info (hw: annex A, f/w: annex A/B/C) -----------
Running Mode : 17A State : SHOWTIME
DS Actual Rate : 52987000 bps US Actual Rate : 15661000 bps
DS Attainable Rate : 45049704 bps US Attainable Rate : 14939000 bps
DS Path Mode : Fast US Path Mode : Fast
DS Interleave Depth : 1 US Interleave Depth : 1
NE Current Attenuation : 20 dB Cur SNR Margin : 4 dB
DS actual PSD : 7. 7 dB US actual PSD : 11. 9 dB
NE CRC Count : 5349 FE CRC Count : 48
NE ES Count : 1402 FE ES Count : 48
apiVersion: security.uswitch.com/v1
kind: SecurityGroupPolicy
metadata:
name: mongodb
namespace: default
spec:
securityGroups:
- name: mongodb
egress:
endpoints:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
2m 2m 2 {default-scheduler } Warning FailedScheduling [SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "demo-storage-claim", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "demo-storage-claim", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "demo-storage-claim", which is unexpected.]
2m 2m 1 {default-scheduler } Normal Scheduled Successfully assigned storage-demo to ip-172-20-11-154.eu-west-1.compute.internal
2m 2m 2 {controller-manager } Warning FailedMount Failed to attach volume "pvc-3f2b2bd1-bbed-11e6-aa3d-0675daf36109" on node "ip-172-20-11-154.eu-west-1.compute.internal" with: Error attaching EBS volume: IncorrectState: vol-bd50263f is not 'available'.
status code: 400, request id:
13s 13s 1 {kubelet ip-172-20-11-154.eu-we
#!/usr/bin/env bash
mkdir -p /tmp/cni
cd /tmp/cni
wget https://github.com/projectcalico/calico-cni/releases/download/v1.5.2/calico -O calico
wget https://github.com/containernetworking/cni/releases/download/v0.3.0/cni-v0.3.0.tgz -O cni.tar.gz
tar zxvf cni.tar.gz
rm cni.tar.gz
mkdir -p /opt/cni/bin
cp * /opt/cni/bin