Source\Destination | External | Apps | System Components |
---|---|---|---|
External |
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
kind: NetworkPolicy | |
apiVersion: networking.k8s.io/v1 | |
metadata: | |
name: ubuntu-allow-all | |
spec: | |
policyTypes: | |
- Egress | |
- Ingress | |
podSelector: | |
matchLabels: |
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: v1 | |
kind: Pod | |
metadata: | |
name: ubuntu | |
labels: | |
app: ubuntu | |
spec: | |
containers: | |
- image: ubuntu | |
command: |
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
#! https://downey.io/notes/dev/convert-loadbalancer-service-to-nodeport-ytt/ | |
#@ load("@ytt:overlay", "overlay") | |
#@overlay/match by=overlay.subset({"kind": "Service", "spec":{"type":"LoadBalancer"}}),expects=1 | |
--- | |
spec: | |
#@overlay/replace | |
type: NodePort |
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: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
annotations: | |
cloudfoundry.org/fqdn: whoami.tim-2020-03-18.routing.lol | |
metacontroller.k8s.io/last-applied-configuration: '{"apiVersion":"networking.istio.io/v1alpha3","kind":"VirtualService","metadata":{"annotations":{"cloudfoundry.org/fqdn":"whoami.tim-2020-03-18.routing.lol"},"creationTimestamp":null,"labels":{"cloudfoundry.org/route-bulk-sync":"true"},"name":"vs-f48b53b677be4b3ddd70beba027fb405fb0a45be6da7ff17bb7e3afdc1942cf3"},"spec":{"gateways":["istio-ingress"],"hosts":["whoami.tim-2020-03-18.routing.lol"],"http":[{"route":[{"destination":{"host":"s-e7017323-678b-454b-b099-9e196b33bb02"},"headers":{"request":{"set":{"CF-App-Id":"46f34772-4c8f-4a09-b18e-75505681265c","CF-App-Process-Type":"web","CF-Organization-Id":"631fec7d-47cc-4e82-8df1-add1c314d94f","CF-Space-Id":"a71aaf82-4f4a-4967-a0a6-471c44484186"}},"response":{}}}]}]}}' | |
creationTimestamp: "2020-03-18T22:35:21Z" | |
generation: 1 | |
labels: | |
cloudfoundry.org/route- |
I hereby claim:
- I am tcdowney on github.
- I am tcdowney (https://keybase.io/tcdowney) on keybase.
- I have a public key whose fingerprint is 90C8 2606 77B1 FF63 34C1 1DEE 301B 9993 40D5 E292
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
leading_digit_regex = /\d+\s+/ | |
path = '/Users/tcdowney/Downloads/ga-vids' | |
Dir.glob("#{path}/*.mp4") do |mp4_file| | |
filename = File.basename(mp4_file, File.extname(mp4_file)) | |
leading_digits = filename.match(leading_digit_regex)[0].to_i | |
padded_digits = sprintf('%03d', leading_digits) | |
padded_filename = filename.gsub(leading_digits.to_s, padded_digits) | |
#puts padded_filename + File.extname(mp4_file) | |
File.rename(mp4_file, padded_filename + File.extname(mp4_file)) |
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
# Inspired by https://raspberrypi.stackexchange.com/questions/169/how-can-i-extend-the-life-of-my-sd-card | |
# Gonna see if I can get by with just disabling swap for now | |
# Disable SWAP | |
sudo dphys-swapfile swapoff && \ | |
sudo dphys-swapfile uninstall && \ | |
sudo update-rc.d dphys-swapfile remove | |
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
# spec/support/missing_translations.rb | |
require 'rspec/expectations' | |
RSpec::Matchers.define :have_missing_translations do | |
match do |actual| | |
missing_i18n_js = /\[missing ".*" translation\]/ | |
missing_i18n_ruby = /class="translation_missing"/ | |
!!(actual.body.match(missing_i18n_ruby) || actual.body.match(missing_i18n_js)) | |
end |
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
def eratosthenes(n) | |
nums = [nil, 1, *2..n] | |
(2..Math.sqrt(n)).each do |i| | |
(i**2..n).step(i){|m| nums[m] = nil} if nums[i] | |
end | |
nums | |
end | |
primes_to_million = eratosthenes(1_000_000) |
NewerOlder