Não use UUID como PK nas tabelas do seu banco de dados.
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
| # | |
| # Tello Python3 Control Demo | |
| # | |
| # http://www.ryzerobotics.com/ | |
| # | |
| # Commands: https://dl-cdn.ryzerobotics.com/downloads/tello/0228/Tello+SDK+Readme.pdf | |
| # 1/1/2018 | |
| import threading | |
| import socket |
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
| from flask import Flask, request, jsonify, json, abort | |
| from flask_cors import CORS, cross_origin | |
| import pandas as pd | |
| app = Flask(__name__) | |
| cors = CORS(app) | |
| app.config['CORS_HEADERS'] = 'Content-Type' |
this is one snipper to install all dependencies to install gstreamer 1.0 on ubuntu.
$ sudo apt install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav \
gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl \
gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio- Extract downloaded boost source, e.g.
C:\Program Files\boost_1_59_0. - Create a folder for Boost.Build installation, e.g.
C:\Program Files\boost-build. - Create a folder within for building, i.e.
C:\Program Files\boost_1_59_0\build. - Create a folder for installation, e.g.
C:\Program Files\boost.
- Open Command Prompt.
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
| " Don't try to be vi compatible | |
| set nocompatible | |
| " Helps force plugins to load correctly when it is turned back on below | |
| filetype off | |
| " TODO: Load plugins here (pathogen or vundle) | |
| " Turn on syntax highlighting | |
| syntax on |
- Step 1:
heroku restart - Step 2:
heroku pg:reset DATABASE(no need to change theDATABASE) - Step 3:
heroku run rake db:migrate - Step 4:
heroku run rake db:seed(if you have seed)
One liner
heroku restart && heroku pg:reset DATABASE --confirm APP-NAME && heroku run bundle exec rails db:migrate
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
| #! /bin/sh | |
| file="bbb_sunflower_2160p_30fps_normal.mp4" | |
| timestamp=`date +%s` | |
| ffmpeg="docker run --rm -it --workdir /tmp -v $PWD:/tmp kynothon/moviola:4.0-alpine " | |
| bento4="docker run -it --rm -u $(id -u):$(id -g) -v $PWD:/tmp --workdir /tmp ggoussard/bento4docker " | |
| echo "Getting the file" | |
| curl -LO http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_2160p_30fps_normal.mp4 | |
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
| import { Controller } from "stimulus" | |
| import { DirectUpload } from "@rails/activestorage" | |
| import { getMetaValue, toArray, findElement, removeElement, insertAfter } from "helpers" | |
| export default class extends Controller { | |
| static targets = [ "input" ] | |
| connect() { | |
| this.dropZone = createDropZone(this) | |
| this.hideFileInput() |
NewerOlder