Skip to content

Instantly share code, notes, and snippets.

View leomonteiro92's full-sized avatar
🤓

Leonardo Monteiro Costa leomonteiro92

🤓
View GitHub Profile
@leomonteiro92
leomonteiro92 / cet.clj
Last active January 13, 2021 19:56
Cálculo CET em Clojure
;;CET (based on implementation of https://github.com/eduardordm/cet-java)
;; Run with inlein http://inlein.org
;; Download inlein and run ./inlein cet.clj
'{:dependencies [
[org.clojure/clojure "1.10.1"]
[clojure.java-time "0.3.2"]] }
(require '[java-time :as t])
(def CET_MAX_VALUE 10000.00)
/**
* Visit https://cloud.google.com/docs/authentication/getting-started and
* follow the steps to generate a service account, by the end you have a json or p2
* file downloaded.
* Export the path so that you have access to the datastore
* export GOOGLE_APPLICATION_CREDENTIALS="/path/to/file.json"
*
* npm init --yes
* npm install firebase-admin
* node index.js <PROJECT_ID>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="https://js.iugu.com/v2"></script>
<script>
@leomonteiro92
leomonteiro92 / p1.js
Last active December 10, 2020 18:42
Developer interview test
'use strict'
const fs = require('fs');
fs.readFile('lista_palavras_desordenada.txt', (err, data) => {
if (err) throw err;
const array = data.toString()
.trim()
.split('\n');
const result = array.filter(item => {
let str = item.trim();