Skip to content

Instantly share code, notes, and snippets.

View tangrammer's full-sized avatar
🏠
Working from home

Juan A. Ruz tangrammer

🏠
Working from home
View GitHub Profile
[["accounts-by-email.spec.api.tokens.df5da507-e6b9-4dd0-abf0-5464f681a368"
"logins-by-inbox"]
["accounts-by-email.spec.api.tokens.607fbb6a-e8e8-4f76-9c24-5ce5a3d8aa70"
"logins-by-inbox"]
["accounts-by-email.spec.api.tokens.3f3b19f8-f742-4e45-b3a8-c272bfaa13d7"
"logins-by-inbox"]
["accounts-by-email.spec.api.tokens.98991232-bd27-46d1-841f-65aad88c6693"
"logins-by-inbox"]
["accounts-by-email.spec.api.tokens.b2f09d5f-d588-41a0-8a52-081e31975a91"
"logins-by-inbox"]
@tangrammer
tangrammer / presentation.org
Created October 30, 2020 19:22 — forked from abrochard/presentation.org
Notes from the "Conquering Kubernetes with Emacs" presentation

Conquering Kubernetes with Emacs

Specific Annoying workflow

Listing pods with kubectl get pods, then select a pod name and copy paste it into kubectl logs [pod name]

Why?

  • I want to streamline my workflow and stop using the terminal
  • learn more about kubernetes
  • main kubernetes extension for Emacs out there is greedy for permissions
@tangrammer
tangrammer / login-auth0.html
Created August 28, 2019 09:40
auth0 versions
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Sign In with Auth0</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
@tangrammer
tangrammer / ddd.md
Created November 20, 2018 23:09 — forked from zsup/ddd.md
Documentation-Driven Development (DDD)

Documentation-Driven Development

The philosophy behind Documentation-Driven Development is a simple: from the perspective of a user, if a feature is not documented, then it doesn't exist, and if a feature is documented incorrectly, then it's broken.

  • Document the feature first. Figure out how you're going to describe the feature to users; if it's not documented, it doesn't exist. Documentation is the best way to define a feature in a user's eyes.
  • Whenever possible, documentation should be reviewed by users (community or Spark Elite) before any development begins.
  • Once documentation has been written, development should commence, and test-driven development is preferred.
  • Unit tests should be written that test the features as described by the documentation. If the functionality ever comes out of alignment with the documentation, tests should fail.
  • When a feature is being modified, it should be modified documentation-first.
  • When documentation is modified, so should be the tests.
@tangrammer
tangrammer / copy-clj-impl.org
Created July 19, 2018 12:55
clojure implementation of formatting copyright years

clj challenge :)

(defn- parse
  "Parse years collection into years integer collection. Example: from ['1978' '1956' ...] to (1978 1956)"
  [col*]
  (map  #(Integer/parseInt %) col*))

(defn- group-consecutive-years
  "Example: from (2014 2010 2011 2012 2015 2016 2017) to ((2010 2011 2012) (2014 2015 2016 2017))"
@tangrammer
tangrammer / example.clj
Created June 19, 2018 15:03
example aggregation generation data from specs
(in-ns 'akvo.lumen.specs.aggregation)
(def s* lumen.s/sample)
(s* ::l.aggregation.filter/filter)
;; => {:operation "remove",
;; :strategy "isLower",
;; :value "3hrEm8YaB0ZxnuS",
;; :column
;; {:columnName "d3",
@tangrammer
tangrammer / org-mode-reference-in.org
Created June 4, 2018 22:06 — forked from drj42/org-mode-reference-in.org
This is a cheat sheet for Emacs org-mode... in org-mode format!
@tangrammer
tangrammer / org-mode-reference-in.org
Created June 4, 2018 22:06 — forked from drj42/org-mode-reference-in.org
This is a cheat sheet for Emacs org-mode... in org-mode format!

inject plpgsql

CREATE OR REPLACE FUNCTION extract_cols_as_char (tablename CHARACTER, my_prefix CHARACTER DEFAULT '')
CREATE OR REPLACE FUNCTION history.log_change() RETURNS trigger AS $_$
DECLARE
c refcursor;
tt tstzrange;
r record;
str text;
my_new text;
BEGIN
str := '';