Skip to content

Instantly share code, notes, and snippets.

View pmyjavec's full-sized avatar
🎯

Paul Myjavec pmyjavec

🎯
View GitHub Profile
"google_project_services.project": { "google_project_services.project": {
"type": "google_project_services", "type": "google_project_services",
"depends_on": [ "depends_on": [
"google_project.main" "google_project.main"
], ],
"primary": { "primary": {
"id": "xxx",
Terraform will perform the following actions:
~ google_project_services.project
services.#: "14" => "4"
services.1560437671: "iam.googleapis.com" => "iam.googleapis.com"
services.1568433289: "oslogin.googleapis.com" => ""
services.1610229196: "bigquery-json.googleapis.com" => ""
services.1712537408: "containerregistry.googleapis.com" => "containerregistry.googleapis.com"
services.2117420113: "pubsub.googleapis.com" => "" services.2240314979: "compute.googleapis.com" => ""
services.2966512281: "deploymentmanager.googleapis.com" => ""
### Keybase proof
I hereby claim:
* I am pmyjavec on github.
* I am pmyjavec (https://keybase.io/pmyjavec) on keybase.
* I have a public key whose fingerprint is E483 7292 B7E4 00E4 C5DF F6CB F326 E81D A965 1EB1
To claim this, I am signing this object:
@pmyjavec
pmyjavec / route532tf
Last active July 17, 2018 05:54
Route53 To Terraform
#!/usr/bin/env ruby
#
# Converts a Route53 Zone file into corresponding Terraform resources using pure Ruby, no deps required.
# See usage for more information.
require "json"
require "erb"
require "logger"
Log = Logger.new(STDERR)
# Builds a docker registry.
#
#
# VERSION 0.0.1
FROM docker-registry.ploop.com/centos:latest
MAINTAINER [email protected]
@pmyjavec
pmyjavec / gist:8002513
Created December 17, 2013 09:50
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> f236ba2ea7f9 2 hours ago 304.2 MB (virtual 608.4 MB)
docker-registry.ploop.com/centos latest c17184e06c79 2 hours ago 304.2 MB (virtual 304.2 MB)
def test
var = ''
(1..2).each do |num|
var = num + num
end
var
end
### Problem, rigid dependency injection ###
class Demo
def initialize
@instancev = Something.new
end
def method_1
do_that
@instancev.something
end
def test_sync(self):
mock = MagicMock(return_value=True)
with mock.patch("subprocess.call", mock):
site.sync(self.config, "site1", "development")
mock.assert_called_with(["rsync", "-an", "/tmp", "/var/tmp"])
new_user_session GET /users/sign_in(.:format) {:controller=>"devise/sessions", :action=>"new"}
user_session POST /users/sign_in(.:format) {:controller=>"devise/sessions", :action=>"create"}
destroy_user_session GET /users/sign_out(.:format) {:controller=>"devise/sessions", :action=>"destroy"}
user_password POST /users/password(.:format) {:controller=>"devise/passwords", :action=>"create"}
new_user_password GET /users/password/new(.:format) {:controller=>"devise/passwords", :action=>"new"}
edit_user_password GET /users/password/edit(.:format) {:controller=>"devise/passwords", :action=>"edit"}
PUT /users/password(.:format) {:controller=>"devise/passwords", :action=>"update"}
home /home(.:format) {:controller=>"home", :action=>"index"}
update_