Skip to content

Instantly share code, notes, and snippets.

View wwwmarcos's full-sized avatar

Marcos Florencio wwwmarcos

View GitHub Profile
// services/http.js
import axios from 'axios'
import storage from './storage'
const transformRequest = (data, headers) => {
headers['x-api-token'] = storage.getToken()
return data
}
<html>
<head>
<title>CSR BRO</title>
</head>
<body>
<div id="root"></div>
</body>
<script src="frameworkscript.js"></script>
<script src="bundle.js"></script>
</html>
[
{
"installDate": 1525867299186,
"enabled": true,
"updateUrl": "https://userstyles.org/styles/chrome/37035.json",
"md5Url": "https://update.userstyles.org/37035.md5",
"url": "http://userstyles.org/styles/37035",
"originalMd5": "3b8956d9374a8accab2a3cf1417dcd87",
"sections": [
{
body { background: #404552; color: #d3dae3; }
a { color: #90939b; }
a:link, a:visited { color: #90939b; }
a:hover, a:active, a:focus { color: #90939b; }
hr { border-bottom: 1px solid #454c5c; border-top: 1px solid #404552; }
h1, h2, h3, h4 { color: #d3dae3; }
h1 a { color: #d3dae3; }
h1 a:active, h1 a:hover, h1 a:link, h1 a:visited { color: #d3dae3; }
.bordered { border: 1px solid #2a2f39; }
.top_border { border-top: 1px solid #2a2f39; }
function getRandom (items) {
return items[Math.floor(Math.random()*items.length)]
}
const fruits = ['uva', 'laranja', 'batata']
getRandom(fruits)
const myArray = [1, 2, 3]
myArray.push(...[5, 6, 7])
console.log(myArray) // Array(6) [ 1, 2, 3, 5, 6, 7 ]
const newArray = [...myArray, 8, 9, 10]
console.log(newArray) // Array(9) [ 1, 2, 3, 5, 6, 7, 8, 9, 10 ]
const anotherArray = newArray.concat([11, 12])
console.log(anotherArray) // Array(11) [ 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12 ]
// index.js
const express = require('express')
const app = express()
const APP_PORT = 3000
app.get('/setup', async (_req, res) => {
res.send('ok')
})
// index.js
const express = require('express')
const Telegraf = require('telegraf')
const app = express()
const APP_PORT = 3000
const { BOT_TOKEN } = process.env
const CURRENT_HOST = ''
{
"version": 2,
"name": "nome-do-seu-bot-bosta",
"alias": [
"nome-do-seu-bot-bosta.now.sh"
],
"public": true,
"builds": [
{
"src": "index.js",
now -e BOT_TOKEN=token-do-seu-bot-gerado-pelo-bot-father  - -prod