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 Solution(object): | |
def mergeAlternately(self, word1, word2): | |
""" | |
:type word1: str | |
:type word2: str | |
:rtype: str | |
""" | |
# Pointer initialisation. | |
i, j = 0, 0 |
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
// maxProfit uses the 2 PTR approach to solve the problem. | |
// Credit goes to neetcode.io https://www.youtube.com/watch?v=1pkOgXD63yU | |
func maxProfit(prices []int) int { | |
var ( | |
left = 0 // buy day | |
right = 1 // sell day | |
maxProfit = 0 | |
) | |
if len(prices) == 0 { |
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
### Keybase proof | |
I hereby claim: | |
* I am jasonbirchall on github. | |
* I am json0 (https://keybase.io/json0) on keybase. | |
* I have a public key ASCF2URR_2MVZ5_wqVUxJcZ2Cyy5gIBC9ZJW35d7UZ9Rpwo | |
To claim this, I am signing this object: |
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
bash-5.0# kops update cluster | |
Using cluster from kubectl context: cp-0312-1044.cloud-platform.service.justice.gov.uk | |
W1203 13:12:31.203714 3441 firewall.go:255] Opening etcd port on masters for access from the nodes, for calico. This is unsafe in untrusted environments. | |
I1203 13:12:31.206637 3441 executor.go:103] Tasks: 0 done / 115 total; 52 can run | |
I1203 13:12:31.755058 3441 executor.go:103] Tasks: 52 done / 115 total; 30 can run | |
I1203 13:12:32.135808 3441 executor.go:103] Tasks: 82 done / 115 total; 23 can run | |
I1203 13:12:33.662455 3441 executor.go:103] Tasks: 105 done / 115 total; 7 can run | |
I1203 13:12:33.957819 3441 dnsname.go:111] AliasTarget for "api.cp-0312-1044.cloud-platform.service.justice.gov.uk." is "api-cp-0312-1044-cloud-pl-ol9qam-154071499.eu-west-2.elb.amazonaws.com." | |
I1203 13:12:34.065153 3441 executor.go:103] Tasks: 112 done / 115 total; 3 can run |
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
bash-5.0# kops update cluster | |
Using cluster from kubectl context: cp-0112-1439.cloud-platform.service.justice.gov.uk | |
] | |
********************************************************************************* | |
A new kubernetes version is available: 1.17.14 | |
Upgrading is recommended (try kops upgrade cluster) | |
More information: https://github.com/kubernetes/kops/blob/master/permalinks/upgrade_k8s.md#1.17.14 |
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 ruby | |
require File.join(".", File.dirname(__FILE__), "pipeline") | |
require 'yaml' | |
require 'json' | |
require 'base64' | |
# TODO: Create more descriptive names for gpg key creation | |
# TODO: Move everything GPG to its own file and require it above | |
# TODO: Make generate_gpg_key method smaller |
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
apiVersion: extensions/v1beta1 | |
kind: PodSecurityPolicy | |
metadata: | |
name: privileged | |
annotations: | |
seccomp.security.alpha.kubernetes.io/allowedProfileNames: "*" | |
spec: | |
privileged: true | |
allowPrivilegeEscalation: true | |
allowedCapabilities: |
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
resource "kubernetes_service" "helm" { | |
metadata { | |
name = "tiller-deploy" | |
namespace = "kube-system" | |
labels { | |
app = "helm" | |
name = "tiller" | |
} | |
} |
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
resource "kubernetes_deployment" "helm" { | |
metadata { | |
name = "tiller-deploy" | |
namespace = "kube-system" | |
labels { | |
app = "helm" | |
name = "tiller" | |
} | |
} |
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
enableAdmissionPlugins:¬ | |
228 - Initializers¬ | |
229 - NamespaceLifecycle¬ | |
230 - LimitRanger¬ | |
231 - ServiceAccount¬ | |
232 - PersistentVolumeLabel¬ | |
233 - DefaultStorageClass¬ | |
234 - DefaultTolerationSeconds¬ | |
235 - MutatingAdmissionWebhook¬ | |
236 - ValidatingAdmissionWebhook¬ |