Dependencies and umbrella projects - Elixir
excoveralls_umbrella - GitHub - parroty/excoveralls_umbrella: Sample project for excoveralls on umbrella elixir projects.
#!/bin/bash | |
ORIGIN="${1}" | |
DEST="${2}" | |
function move_files { | |
ORIGIN="${1}" | |
if test -f "${ORIGIN}" | |
then |
function shuffle(arr) { | |
const {acc} = arr.reduce( | |
({acc, current}) => { | |
const index = Math.round(Math.random() * (current.length - 1)) | |
const item = current[index] | |
current.splice(index, 1) | |
return {acc: [...acc, item], current} | |
}, | |
{acc: [], current: [...arr]} |
function hasEvent(event, entry) { | |
return entry.events.indexOf(event) !== -1 | |
} | |
function tableFor(event, journal) { | |
return journal.reduce( | |
(table, entry) => { | |
const hasTheEvent = hasEvent(event, entry) | |
const isSquirrel = entry.squirrel |
<?php | |
class Password | |
{ | |
public static function hash(string $password): string | |
{ | |
return password_hash(base64_encode(hash('sha384', $password, true)), PASSWORD_BCRYPT); | |
} | |
public static function verify(string $password, string $hash): bool |
Os nomes das tabelas e colunas devem estar minúsculas e as palavras devem ser separadas por underscore, seguindo o padrão snake case. E todos os termos devem estar em inglês, exceto alguns termos que não há tradução apropriada para o inglês. Sempre prefira nomes descritivos, evitando ao máximo contrações.
Os nomes das tabelas devem estar no plural.
.z-depth-focus { | |
box-shadow: 0 0 8px rgba(0, 0, 0, .18), 0 8px 16px rgba(0, 0, 0, .36); | |
} | |
.z-depth-2dp { | |
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), | |
0 1px 5px 0 rgba(0, 0, 0, .12), | |
0 3px 1px -2px rgba(0, 0, 0, .2); | |
} |
# This file is for unifying the coding style for different editors and IDEs | |
# editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
function supportInputDate() { | |
const type = 'date' | |
const smile = '1)' | |
const inputElement = document.createElement('input') | |
inputElement.setAttribute('type', type) | |
inputElement.value = smile | |
inputElement.value !== smile | |
return inputElement.type === 'date' && inputElement.value !== smile |
const throttle = (limit, fn) => { | |
let wait = false | |
return (...args) => { | |
if (!wait) { | |
fn(...args) | |
wait = true | |
setTimeout(() => { | |
wait = false | |
}, limit) |