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
require('dotenv').config() | |
const express = require('express') | |
const crypto = require('crypto') | |
function verifySignature(body, signature) { | |
const webhookSecret = process.env.STORYBLOK_WEBHOOK_SECRET | |
let bodyHmac = crypto.createHmac('sha1', webhookSecret) | |
.update(body) | |
.digest('hex') |
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
WIN = "win" | |
LOSS = "loss" | |
DRAW = "draw" | |
class Game | |
attr_accessor :player1 | |
attr_accessor :player2 | |
attr_accessor :result | |
def initialize(player1, player2, result) |
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
(function(){ | |
// como vamos usar o throttle varias vezes (no scroll e no resize), | |
// encapsulei essa funcionalidade numa função | |
function throttle(fn) { | |
fn.jarodei = false; | |
return function(){ | |
if (fn.jarodei) return; | |
fn.jarodei = true; |
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
<template> | |
<Layout :global-content="globalContent"> | |
<component | |
v-if="story.content.component" | |
:key="story.content._uid" | |
:blok="story.content" | |
:is="story.content.component" | |
/> | |
</Layout> | |
</template> |
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
<template> | |
<Layout :global-content="globalContent"> | |
<component | |
v-if="story.content.component" | |
:key="story.content._uid" | |
:blok="story.content" | |
:is="story.content.component" | |
/> | |
</Layout> | |
</template> |
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
/** | |
Meu erro foi achar que o objeto wrapper era a própria instância de Tabs. A solução foi usar a função mockada para testar se o evento input foi emitido após o click na Tab. | |
*/ | |
import { mount } from '@vue/test-utils' | |
import { Tabs, Tab } from '..' | |
describe('Test Tabs and Tab component', () => { | |
describe('when default behavior', () => { | |
const onInput = jest.fn() |
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
/*! | |
* storyblok-js-client v0.0.0-development | |
* Universal JavaScript SDK for Storyblok's API | |
* (c) 2018-2020 Stobylok | |
*/ | |
var Storyblok = (function (exports, axios) { | |
'use strict'; | |
axios = axios && Object.prototype.hasOwnProperty.call(axios, 'default') ? axios['default'] : axios; |
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 [ normalElements, starredElements ] = elements.reduce( | |
(acc, space) => { | |
const [ normalElements, starredElements ] = acc | |
if (_.contains(this.favouriteElements, space.id)) { | |
starredElements.push(space) | |
return [ normalElements, starredElements ] | |
} | |
normalElements.push(space) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title> Test Geocalization </title> | |
</head> | |
<body> | |
<button id="button"> Click </button> |
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
class Tarefa3 { | |
constructor () { | |
this.fila = [] | |
this.quantidadeMaxima = 50 | |
this.inicio = 0 | |
this.fimN = -1 | |
this.fimG = -1 | |
this.fimP = -1 | |
this.fimFila = 0 | |
} |
NewerOlder