Skip to content

Instantly share code, notes, and snippets.

Mix.install([
{:ecto_sql, "~> 3.7.0"},
{:postgrex, "~> 0.15.0"}
])
Application.put_env(:foo, Repo, database: "mix_install_examples", password: "postgres", username: "postgres")
defmodule Repo do
use Ecto.Repo,
adapter: Ecto.Adapters.Postgres,
Mix.install([
{:benchee, "~> 1.0"},
{:benchee_html, "~> 1.0", only: :dev}
])
minimal_size = 5
medium_size = 1000
big_size = 10_000
build_list = fn size ->
From f034e4a69845f47f5789f2b136b24626e17600a2 Mon Sep 17 00:00:00 2001
From: v0idpwn <v0idpwn@gmail.com>
Date: Mon, 2 Nov 2020 16:57:41 -0300
Subject: [PATCH] reproducing attempt
---
test/ecto/repo_test.exs | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/test/ecto/repo_test.exs b/test/ecto/repo_test.exs
-- primality test written in haskell
-- github.com/v0idpwn
multipliers = [y | k <- [1..], y <- [(6*k)-1, (6*k)+1]]
used n = [2,3] ++ takeWhile(< sqrt n) multipliers
check_div :: Int -> Int -> Bool
check_div k p
| mod k p == 0 = True
| otherwise = False
@v0idpwn
v0idpwn / get_lang.cpp
Last active October 9, 2015 23:35
Get system language
#include <stdio.h>
#include <locale.h>
int main (){
int repeat=0;
do {
printf ("Locale is: %s\n", setlocale(LC_CTYPE,NULL) );
setlocale (LC_CTYPE,"");
} while (!repeat++);
return 0;