Skip to content

Instantly share code, notes, and snippets.

View marcusvx's full-sized avatar
:shipit:

Marcus Vinicius Ximenes de Souza marcusvx

:shipit:
View GitHub Profile
const toUnixTime = (date) => date.getTime() / 1000;
const usageInterval = (start, end) => ({
start: toUnixTime(start),
end: toUnixTime(end)
});
const getSundayOfTheWeek = (currentDate) => {
const date = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());
using System;
namespace JOIEnergy.Domain
{
public class ElectricityReadingInterval
{
public DateTime Start { get; private set; }
public DateTime End { get; private set; }
public ElectricityReadingInterval(DateTime start, DateTime end)
@marcusvx
marcusvx / automatizacaoHoras.js
Created September 4, 2020 14:45
Automatização do preenchimento de horas
(async function automatizarChatice() {
const horarios = [
'', '',
'', '',
'09:30', '19:00',
'09:30', '19:30',
];
const caixinhasTexto = document.querySelectorAll(".txt40");
// Example of pipeline process write in kotlin
fun multiplyIt(x:Int): Int {
println(x * 2)
return x * 2
}
fun plusTwo(x: Int): Int {
println(x + 2)
return x + 2
}
function flattenArray(array) {
return array.reduce((acc, cur) => {
return acc.concat(Array.isArray(cur) ? flatten(cur) : cur);
}, []);
}
using System;
using System.Data;
using ClosedXML.Excel;
namespace ConsoleApp1
{
class Program
{
private static readonly Random Random = new Random();
public static string Lorem =