I hereby claim:
- I am avdgaag on github.
- I am avdgaag (https://keybase.io/avdgaag) on keybase.
- I have a public key whose fingerprint is 4F42 6A06 0AD7 FB17 65C7 F164 7109 F6F2 67B5 C31C
To claim this, I am signing this object:
| def index(conn, _params) do | |
| conn = conn | |
| |> put_resp_content_type("text/csv") | |
| |> put_resp_header("content-disposition", "attachment; filename=export.csv") | |
| |> send_cunked(200) | |
| Repo.transaction fn -> | |
| Ecto.Adapters.SQL.stream(Repo, "COPY expensive_report TO STDOUT CSV HEADER") | |
| |> Stream.map(&(chunk(conn, &1.rows))) | |
| |> Stream.run |
| import Html.App as App | |
| import Html exposing (..) | |
| import Html.Attributes exposing (..) | |
| import Http | |
| import Task | |
| import Json.Decode as Json exposing ((:=)) | |
| -- MODEL | |
| type alias Model = |
I hereby claim:
To claim this, I am signing this object:
| # Lotus has different applications in a single project, optionally with different configurations and/or mappings. | |
| # ROM::Lotus should/could conigure a different setup per application, rather than a single global setup. | |
| # Relations could be global (defined in ./lib) while mappings might live in both (./apps/web/ and ./lib). | |
| # This would resemble how Lotus::Model is organised. | |
| # | |
| # The only problem here is that Lotus has no hooks for loading framework (it's all hard-coded)s, and | |
| # therefore we can't easily extend the application load process with our custom setup code without | |
| # resorting to monkeypatching. | |
| # apps/web/application.rb |
| #!/usr/bin/env ruby | |
| require 'open3' | |
| require 'tmpdir' | |
| module Literate | |
| class Line | |
| INDENT = ''.freeze | |
| def self.indent(str) |
| class ProductForm | |
| attr_reader :page, :form | |
| def initialize(page) | |
| @page = page | |
| @form = page.find('form.new_product') | |
| end | |
| def title=(new_title) | |
| form.fill_in 'product_title', with: new_title |
| function! MyOmniFunc(findstart, base) | |
| if a:findstart | |
| let existing = matchstr(getline('.')[0:col('.')-1],'#\d*$') | |
| return col('.')-1-strlen(existing) | |
| endif | |
| ruby << EOF | |
| require 'open-uri' | |
| require 'json' | |
| def issues(repo, token) |
| #!/bin/bash | |
| # | |
| # DESCRIPTION | |
| # | |
| # Simple read-only comand-line interface to your Things 2 database. Since | |
| # Things uses a SQLite database (which should come pre-installed on your Mac) | |
| # we can simply query it straight from the command line. | |
| # | |
| # We only do read operations since we don't want to mess up your data. | |
| # |
| #!/bin/sh | |
| # Add this to .git/hooks/pre-commit to reject any commits | |
| # that contain Git conflict markers. | |
| if git diff --cached --name-only --diff-filter=ACM | xargs grep -H -n -E '^(<|>|=|\|){7}' > /dev/null; then | |
| echo "\033[31mWarning:\033[0m You have left some Git conflict markers in." | |
| echo 'Your commit is bad and you should feel bad.' | |
| echo | |
| git diff --cached --name-only --diff-filter=ACM | xargs grep -H -n -E '^(<|>|=|\|){7}' | |
| exit 1 |
| #!/bin/bash | |
| git diff --cached --name-status --diff-filter=ACM | awk '/\.rb$/ { print $2 }' | xargs rubocop -f s | |
| exit_code=$? | |
| if [[ $exit_code != 0 ]] ; then | |
| echo 'Your commit was rejected because Rubocop found style guide violations.' | |
| echo 'Run `rake rubocop` to test your code and inspect the offenses Rubocop' | |
| echo 'has found.' | |
| echo | |
| echo 'If you really, REALLY want to commit this code, skip your pre-commit' | |
| echo 'hooks with `git commit --no-verify`.' |