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
// https://play.monsterquest.io/ | |
// Usage: | |
// Copy this content, create file with `index.js` name | |
// Copy access token at browser sessionStorage and replace `accessToken` var (line 13) with it | |
// Run on terminal: | |
// npm i axios | |
// node index.js |
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 IgApiClient = require('instagram-private-api').IgApiClient; | |
const ig = new IgApiClient(); | |
// Suas credenciais (para algumas ações, inclusive buscar imagens, é obrigatório) | |
const userName = 'papalardo'; | |
const userPassword = ''; | |
// Para buscar o id do usuário acesse: https://codeofaninja.com/tools/find-instagram-user-id/ | |
const userId = '40266287952'; | |
// Gera estado - Obrigatório |
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 Crunker { | |
constructor({ sampleRate = 44100 } = {}) { | |
this._sampleRate = sampleRate; | |
this._context = this._createContext(); | |
} | |
_createContext() { | |
window.AudioContext = | |
window.AudioContext || | |
window.webkitAudioContext || |
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
<?php | |
use Carbon\CarbonPeriod; | |
// On user model | |
public function scopeBirthdayBetween($query, $dateBegin, $dateEnd) | |
{ | |
$period = CarbonPeriod::create($dateBegin, $dateEnd); | |
foreach ($period as $key => $date) { |
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
// https://github.com/sindresorhus/is-regexp | |
const isRegex = input => Object.prototype.toString.call(input) === '[object RegExp]'; | |
// https://github.com/sindresorhus/clone-regexp | |
const cloneRegexp = (e,n={}) =>{if(!isRegexp(e))throw new TypeError("Expected a RegExp instance");const t=Object.keys({ global: 'g', ignoreCase: 'i', multiline: 'm', dotAll: 's', sticky: 'y', unicode: 'u' }).map(t=>("boolean"==typeof n[t]?n[t]:e[t])?{ global: 'g', ignoreCase: 'i', multiline: 'm', dotAll: 's', sticky: 'y', unicode: 'u' }[t]:"").join(""),a=new RegExp(n.source||e.source,t);return a.lastIndex="number"==typeof n.lastIndex?n.lastIndex:e.lastIndex,a}; | |
// https://github.com/andrewrk/node-diacritics | |
let replacementList = [{ base: ' ', chars: "\u00A0", }, { base: '0', chars: "\u07C0", }, { base: 'A', chars: "\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F", }, { base: 'AA', c |
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 normalize = str => str.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); | |
let text = "Lorem Ipsum íís simply dummy tééxt of the printing and typesetting industry."; | |
let termSearch = 'lorem iss'; | |
text = normalize(text).toLowerCase(); | |
termSearch = normalize(termSearch).toLowerCase(); | |
multiSearchAnd: | |
(text, searchWords) => |
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> | |
<div class="callout calendar-day"> | |
<div class="grid-x align-middle align-middle"> | |
<div class="shrink cell"> | |
<h1>{{ this.momentInstance.format('DD') }}</h1> | |
</div> | |
<div class="auto cell"> | |
<h6>{{ this.momentInstance.format('[de] MMMM [de] YYYY') }}</h6> | |
<h6 class="light">{{ this.momentInstance.format('dddd[.] HH:mm:ss') }} </h6> | |
</div> |
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
$path = './api'; | |
$filename = 'estados.json'; | |
$filePath = $path .'/'. $filename; | |
if(file_exists($filePath)) { | |
$content = json_decode(file_get_contents($filePath), true); | |
return $content; | |
} | |
$somenteEssesEstados = ['RJ', 'SP']; |
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
// SVG Inject | |
https://github.com/iconfu/svg-inject | |
// Check if is Mobile | |
window.mobilecheck = function () { | |
var check = false; | |
(function (a) { | |
if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp) |
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
/* TABLE */ | |
@media screen and (max-width: 63.9375em) { | |
} | |
/* MOBILE */ | |
@media screen and (max-width: 39.9375em) { | |
} |
NewerOlder