This file contains hidden or 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
# frozen_string_literal: true | |
module InstagramProviderHelper | |
def network | |
send(self.provider) | |
end | |
def last_photo | |
network.dig(:medias).last.dig(:media_url) | |
end |
This file contains hidden or 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
# This file is auto-generated from the current state of the database. Instead | |
# of editing this file, please use the migrations feature of Active Record to | |
# incrementally modify your database, and then regenerate this schema definition. | |
# | |
# Note that this schema.rb definition is the authoritative source for your | |
# database schema. If you need to create the application database on another | |
# system, you should be using db:schema:load, not running all the migrations | |
# from scratch. The latter is a flawed and unsustainable approach (the more migrations | |
# you'll amass, the slower it'll run and the greater likelihood for issues). | |
# |
This file contains hidden or 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
{ | |
user(id: "1"){ | |
name | |
pictureUrl | |
purchases{ | |
id | |
totalValue | |
createdAt | |
products{ | |
name |
This file contains hidden or 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
1) Primeiro temos que listar as páginas vinculadas a conta do usuário. Após isso temos que pegar o ID da página e ver se ela tem uma conta do instagram vinculada a ela. | |
"https://graph.facebook.com/v3.2/me/accounts?access_token={access-token}" | |
Nesse caso teria que entrar página por página e pegar o ID do instagram para ver qual delas é vinculada a algum pefil. | |
No meu caso tenho o ID 1322789317880339 | |
____ | |
This file contains hidden or 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
# Entrar no console | |
$ adonis repl | |
# Inciar database | |
database = use('Database') | |
# Rodar a query | |
(await database.select('*').from('influencers')) | |
# Update |
This file contains hidden or 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
pip3 install cmake | |
pip3 install py-postgresql face_recognition opencv-python |
This file contains hidden or 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
"use strict"; | |
async function main(){ | |
const AWS = require('aws-sdk'), | |
fs = require('fs'), | |
util = require('util'), | |
exec = util.promisify(require('child_process').exec), | |
s3 = new AWS.S3() | |
This file contains hidden or 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
wget https://github.com/szechyjs/dsd/archive/master.tar.gz -O dsd.tar.gz | |
tar -xzf dsd-master.tar.gz | |
cd dsd-master | |
./travis_deps.sh | |
mkdir build | |
cd build | |
cmake -DCMAKE_INSTALL_PREFIX=$HOME/mbelib -DCMAKE_INSTALL_PREFIX=$HOME/itpp .. | |
make | |
sudo make install |
This file contains hidden or 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
curl -SL https://github.com/csete/gqrx/releases/download/v2.9/gqrx-2.9-linux-armv6.tar.xz | tar xJv |
This file contains hidden or 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
user ubuntu; | |
worker_processes 1; | |
#error_log /home/ubuntu/logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |