Skip to content

Instantly share code, notes, and snippets.

View pkoch's full-sized avatar

Paulo Koch pkoch

View GitHub Profile
1 apt update
2 apt install r-cran-littler
3 R CMD check --as-cran
4 R CMD install.packages(devtools)
5 Rscript 'install.packages(devtools)'
6 Rscript -e 'install.packages(devtools)'
7 Rscript -e 'install.packages("devtools")'
8 Rscript -e 'install.packages()'
9 Rscript -e 'install.packages(c("devtools"))'
10 Rscript -e 'install.packages(c("roxygen2", "jsonlite"), repos="http://cran.us.r-project.org")'
defmodule Derp do
def project(map, args) do
for k <- args, do: map[k]
end
end
IO.inspect Derp.project(%{a: 1, b: 2}, [:b, :a])
defmodule Derp do
def project(map, args) do
map
|> Map.take(args)
for k <- args, do: map[k]
end
end
IO.inspect Derp.project(%{a: 1, b: 2}, [:b, :a])
pkoch  ~  iex
Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Interactive Elixir (1.4.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> defmodule User do
...(1)> defstruct name: "john"
...(1)> end
{:module, User,
<<70, 79, 82, 49, 0, 0, 8, 240, 66, 69, 65, 77, 69, 120, 68, 99, 0, 0, 0, 186,
131, 104, 2, 100, 0, 14, 101, 108, 105, 120, 105, 114, 95, 100, 111, 99, 115,
diff --git a/apps/artbay_api/test/controllers/auth_controller_test.exs b/apps/artbay_api/test/controllers/auth_controller_test.exs
index 9f82660..b39bd1a 100644
--- a/apps/artbay_api/test/controllers/auth_controller_test.exs
+++ b/apps/artbay_api/test/controllers/auth_controller_test.exs
@@ -29,7 +29,7 @@ defmodule ArtbayAPI.AuthControllerTest do
end
test "logins user with valid attributes", %{conn: conn} do
- {:ok, _user} = Hermitage.Services.UserRegistry.register_user(@post_attrs)
+ {:ok, %User{}} = Hermitage.Services.UserRegistry.register_user(@post_attrs)
diff --git a/apps/artbay_api/test/controllers/auth_controller_test.exs b/apps/artbay_api/test/controllers/auth_controller_test.exs
index 9f82660..b39bd1a 100644
--- a/apps/artbay_api/test/controllers/auth_controller_test.exs
+++ b/apps/artbay_api/test/controllers/auth_controller_test.exs
@@ -29,7 +29,7 @@ defmodule ArtbayAPI.AuthControllerTest do
end
test "logins user with valid attributes", %{conn: conn} do
- {:ok, _user} = Hermitage.Services.UserRegistry.register_user(@post_attrs)
+ {:ok, %User{}} = Hermitage.Services.UserRegistry.register_user(@post_attrs)
14 - 16/04: 334
21 - 23/04: 369
28 - 30/04: 369
05 - 07/05: 244
12 - 14/05: 301
19 - 21/05: 221
26 - 28/05: Casamento Barrote (mas seria 235)
02 - 04/06: 155
09 - 11/06: 203
16 - 18/06: 176
### Keybase proof
I hereby claim:
* I am pkoch on github.
* I am pkoch (https://keybase.io/pkoch) on keybase.
* I have a public key whose fingerprint is 7CF8 9ADC DA4C B27D 18A9 43E4 F6B4 B934 98A0 C85D
To claim this, I am signing this object:
import boto3
import ipdb; ipdb.set_trace()
client = boto3.client("route53")
client2 = boto3.client("route53")
@pkoch
pkoch / -
Created March 17, 2017 11:35
diff --git a/certbot_route53/authenticator.py b/certbot_route53/authenticator.py
index fe87f96..b8d020a 100644
--- a/certbot_route53/authenticator.py
+++ b/certbot_route53/authenticator.py
@@ -39,6 +39,7 @@ class Authenticator(common.Plugin):
def __init__(self, *args, **kwargs):
super(Authenticator, self).__init__(*args, **kwargs)
+ self.r53 = boto3.client("route53")