Skip to content

Instantly share code, notes, and snippets.

View natevick's full-sized avatar
👋

Nate Vick natevick

👋
View GitHub Profile
Error: Post "https://391b933f-decf-484c-879c-5c5c1b2cf31e.k8s.ondigitalocean.com/api/v1/namespaces/default/secrets": x509: certificate signed by unknown authority
on cdk.tf.json line 428, in resource.kubernetes_secret.exampleproduction_docrregistrysecret_2A827CB4:
428: },
Error: Post "https://391b933f-decf-484c-879c-5c5c1b2cf31e.k8s.ondigitalocean.com/api/v1/namespaces/default/secrets": x509: certificate signed by unknown authority
on cdk.tf.json line 461, in resource.kubernetes_secret.exampleproduction_dburlsecret_F8BB4CF4:
@natevick
natevick / Dockerfile
Last active May 20, 2022 11:01
Base Rails Docker Development Environment
ARG RUBY_VERSION=2.6
FROM ruby:$RUBY_VERSION
ARG DEBIAN_FRONTEND=noninteractive
ARG NODE_VERSION=11
RUN curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
{"EXIT"=>0, "HUP"=>1, "INT"=>2, "QUIT"=>3, "ILL"=>4, "TRAP"=>5, "ABRT"=>6, "IOT"=>6, "FPE"=>8, "KILL"=>9, "BUS"=>7, "SEGV"=>11, "SYS"=>31, "PIPE"=>13, "ALRM"=>14, "TERM"=>15, "URG"=>23, "STOP"=>19, "TSTP"=>20, "CONT"=>18, "CHLD"=>17, "CLD"=>17, "TTIN"=>21, "TTOU"=>22, "IO"=>29, "XCPU"=>24, "XFSZ"=>25, "VTALRM"=>26, "PROF"=>27, "WINCH"=>28, "USR1"=>10, "USR2"=>12, "PWR"=>30, "POLL"=>29}
@natevick
natevick / capybara_initializer_rails_4.rb
Created January 9, 2020 22:56
Capybara Initializers
class CapybaraInitializer
attr_accessor :headless, :context
alias :headless? :headless
def initialize
@headless = true
end
def call
default: &default
adapter: postgresql
encoding: unicode
pool: <%= ENV.fetch("RAILS_MAX_THREADS", 5) %>
username: <%= ENV.fetch("DATABASE_USER", 'postgres') %>
host: <%= ENV.fetch("DATABASE_HOST", 'localhost') %>
port: 5432
development:
<<: *default
@natevick
natevick / docker-pry-rails.md
Created November 23, 2019 13:59 — forked from briankung/docker-pry-rails.md
Using pry-rails with Docker
defmodule FizzbuzzPatt do
def run(number) when rem(number, 15) == 0 do
"FizzBuzz"
end
def run(number) when rem(number, 5) == 0 do
"Buzz"
end
def run(number) when rem(number, 3) == 0 do
"Fizz"
end

Keybase proof

I hereby claim:

  • I am natevick on github.
  • I am natevick (https://keybase.io/natevick) on keybase.
  • I have a public key ASA2pMhmEQGeFcN9DVFdiX3DrFsIzaeME2iE7SyMhrKdhAo

To claim this, I am signing this object:

[1] pry(main)> data = "Vare, very confidential data"
=> "Vare, very confidential data"
[2] pry(main)> require "openssl"
=> true
[3] pry(main)> cipher = OpenSSL::Cipher::AES.new(128, :CBC)
=> #<OpenSSL::Cipher::AES:0x007f9332ca8df8>
[4] pry(main)> cipher.encrypt
=> #<OpenSSL::Cipher::AES:0x007f9332ca8df8>
[5] pry(main)> key = cipher.random_key
=> "\xFE\xCF\xF8G}\xE5\xCE\xCD\x9CP+\xBF\xC1)?j"
FieldStructure=%7B%22Fields%22%3A%5B%7B%22Title%22%3A%22Event+Name%22%2C%22Instructions%22%3A%22Enter+the+name+of+the+event+as+you%27d+like+it+to+appear+to+the+public.%22%2C%22IsRequired%22%3A%221%22%2C%22ClassNames%22%3A%22%22%2C%22DefaultVal%22%3A%22%22%2C%22Page%22%3A%221%22%2C%22Type%22%3A%22text%22%2C%22ID%22%3A%22Field1%22%7D%2C%7B%22Title%22%3A%22Short+Description%22%2C%22Instructions%22%3A%22Enter+a+one+sentence+summary+of+the+event.%22%2C%22IsRequired%22%3A%221%22%2C%22ClassNames%22%3A%22%22%2C%22DefaultVal%22%3A%22%22%2C%22Page%22%3A%221%22%2C%22Type%22%3A%22text%22%2C%22ID%22%3A%22Field3%22%7D%2C%7B%22Title%22%3A%22Detailed+Description%22%2C%22Instructions%22%3A%22Enter+all+the+details+about+your+event+you+will+want+the+public+to+know.+Please+be+as+descriptive+and+detailed+as+possible.%22%2C%22IsRequired%22%3A%221%22%2C%22ClassNames%22%3A%22%22%2C%22DefaultVal%22%3A%22%22%2C%22Page%22%3A%221%22%2C%22Type%22%3A%22textarea%22%2C%22ID%22%3A%22Field2%22%7D%2C%7B%22Title%22%3A%22Event+Start+Date%22%2C%2