This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const glob = require('glob'); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); | |
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); | |
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
module.exports = (env, options) => ({ | |
optimization: { | |
minimizer: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MorningBrewPuzzle do | |
@moduledoc """ | |
Brain Teaser from Morning Brew newsletter | |
Each letter stands for a unique digit that makes the arithmetic equation true. Can you solve it? | |
(J+O+I+N+T)^3=JOINT | |
""" | |
@doc """ | |
Build permutations of digits from 1 to 9 (exclude 0 for simplifying a bit), slice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule TagSearchElement do | |
@moduledoc """ | |
Helpers for building a Search definition | |
a List or List of Lists of TagSearchElement are stored in the search | |
column in the tag_searches table | |
""" | |
def new(key, comparison, value, connective \\ nil) | |
when comparison in ["equal", "notequal", "like", "notlike"] and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Throttle do | |
alias __MODULE__ | |
defstruct ms_interval: 1000, | |
initial_func: nil, | |
handle_func: nil, | |
final_func: nil, | |
batch_size: 5, | |
data: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@doc """ | |
Returns true if Jira exists, else false. | |
""" | |
def ticket_exists?(key) do | |
{project, jira_num} = split_jira(key) | |
from( | |
j in JiraIssue, | |
join: p in assoc(j, :jira_project), | |
where: p.pkey == ^project and j.issuenum == ^jira_num, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
Dropzone.options.dzUpload = { | |
autoProcessQueue: false, | |
uploadMultiple: true, | |
parallelUploads: 100, | |
maxFiles: 100, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule CodeDeployInstances do | |
@moduledoc """ | |
Given a CodeDeploy Deployment Id return the instance ids deployed to. | |
""" | |
@doc """ | |
Given a CodeDeploy Deployment Id return the instance ids deployed to. | |
Returns `{:ok, [instance_id, ...]}` on success, or `{:error, []}` on failure. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule HdapViewer.AuthTest do | |
use HdapViewer.ConnCase | |
alias HdapViewer.Auth | |
setup %{conn: conn} do | |
conn = | |
conn | |
|> bypass_through(HdaViewer.Router, :browser) | |
|> get("/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT r.recording_id FROM userdata.recordings r | |
LEFT OUTER JOIN recording_migrator_recordings_existing rmre ON (rmre.recording_id = r.recording_id) | |
AND r.account_service_id = 1000 | |
AND rmre.recording_id IS NULL; | |
recording_id | |
-------------- | |
1000 | |
10000 | |
(2 rows) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mix ecto.drop | |
Compiling 12 files (.ex) | |
warning: unused alias FishLanded | |
lib/fishing_spot/models/fish_landed.ex:3 | |
== Compilation error on file lib/fishing_spot/repo.ex == | |
** (ArgumentError) missing :adapter configuration in config :fishing_spot, FishingSpot.Repo | |
lib/ecto/repo/supervisor.ex:37: Ecto.Repo.Supervisor.parse_config/2 | |
lib/fishing_spot/repo.ex:2: (module) |
NewerOlder