Skip to content

Instantly share code, notes, and snippets.

View breim's full-sized avatar
:shipit:

Henrique Breim breim

:shipit:
  • Barcelona, Spain
View GitHub Profile
# 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 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).
#
{
user(id: "1"){
name
pictureUrl
purchases{
id
totalValue
createdAt
products{
name
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
____
# Entrar no console
$ adonis repl
# Inciar database
database = use('Database')
# Rodar a query
(await database.select('*').from('influencers'))
# Update
pip3 install cmake
pip3 install py-postgresql face_recognition opencv-python
"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()
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
curl -SL https://github.com/csete/gqrx/releases/download/v2.9/gqrx-2.9-linux-armv6.tar.xz | tar xJv
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;