Skip to content

Instantly share code, notes, and snippets.

View wwwmarcos's full-sized avatar

Marcos Florencio wwwmarcos

View GitHub Profile
const Twitter = require('twitter-lite')
const twitter = new Twitter({
consumer_key: process.env.CONSUMER_KEY,
consumer_secret: process.env.CONSUMER_SECRET,
access_token_key: process.env.ACCESS_TOKEN_KEY,
access_token_secret: process.env.ACCESS_TOKEN_SECRET
})
const SOURCE_USER = process.env.SOURCE_USER
[1,2,3,4]
now -e BOT_TOKEN=token-do-seu-bot-gerado-pelo-bot-father  - -prod
{
"version": 2,
"name": "nome-do-seu-bot-bosta",
"alias": [
"nome-do-seu-bot-bosta.now.sh"
],
"public": true,
"builds": [
{
"src": "index.js",
// 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 = ''
// index.js
const express = require('express')
const app = express()
const APP_PORT = 3000
app.get('/setup', async (_req, res) => {
res.send('ok')
})
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 ]
function getRandom (items) {
return items[Math.floor(Math.random()*items.length)]
}
const fruits = ['uva', 'laranja', 'batata']
getRandom(fruits)
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; }
[
{
"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": [
{