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
import React from 'react'; | |
import { Router } from 'next-router'; | |
import getAuthSession from 'services/authSession'; | |
function redirect(res) { | |
if (res) { | |
// SSR | |
res.writeHead(302, { Location: '/' }); | |
res.end(); |
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
@media screen and (min-aspect-ratio: 16/9) { | |
.background { | |
width: 100%; | |
height: auto; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
} |
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
/* Remove banner_slb_topo no período de eleição para páginas com régua de apuração */ | |
(function() { | |
var isElection = false; | |
console.log('[ADS] Eleicao Ativa:', isElection); | |
if( isElection && hasElectionHeader() ) { | |
for(var i = 0; i < desktop_positions_list.length; i++) { | |
if(desktop_positions_list[i].id === 'banner_slb_topo') { | |
desktop_positions_list.splice(i, 1); | |
break; | |
} |
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
#include <unistd.h> | |
#include <stdio.h> | |
// cc.byexamples.com calls this int kbhit(), to mirror the Windows console | |
// function of the same name. Otherwise, the code is the same. | |
bool inputAvailable() | |
{ | |
struct timeval tv; | |
fd_set fds; | |
tv.tv_sec = 0; |