Skip to content

Instantly share code, notes, and snippets.

View israeljrs's full-sized avatar

Israel Junior israeljrs

View GitHub Profile
@israeljrs
israeljrs / simple_dji_tello_control.py
Created July 28, 2020 15:12 — forked from thomasnield/simple_dji_tello_control.py
Simple DJI Tello Drone Control
#
# 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
@israeljrs
israeljrs / simple_python_datasource.py
Created June 25, 2020 00:53 — forked from linar-jether/simple_python_datasource.py
Grafana python datasource - using pandas for timeseries and table data. inspired by and compatible with the simple json datasource
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'
@israeljrs
israeljrs / boost-windows.md
Created May 15, 2020 13:54 — forked from sim642/boost-windows.md
Installing boost libraries for GCC (MinGW) on Windows

Installing boost libraries for GCC (MinGW) on Windows

Folder setup

  1. Extract downloaded boost source, e.g. C:\Program Files\boost_1_59_0.
  2. Create a folder for Boost.Build installation, e.g. C:\Program Files\boost-build.
  3. Create a folder within for building, i.e. C:\Program Files\boost_1_59_0\build.
  4. Create a folder for installation, e.g. C:\Program Files\boost.

GCC setup

  1. Open Command Prompt.
@israeljrs
israeljrs / ffmpeg_commands.md
Last active May 6, 2025 01:35 — forked from travelhawk/ffmpeg_commands.md
Collection of ffmpeg commands (basic usage, streaming, advanced usage)

ffmpeg

ffmpeg is a fast video and audio converter that can also grab from a live audio/video source.

Standard usage

Getting help and information

  • -h show all options
  • -h(elp) topic show help
  • -version show version
@israeljrs
israeljrs / .vimrc
Created December 5, 2019 01:38 — forked from simonista/.vimrc
A basic .vimrc file that will serve as a good template on which to build.
" 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
@israeljrs
israeljrs / heroku_pg_db_reset.md
Created December 4, 2019 13:51 — forked from zulhfreelancer/heroku_pg_db_reset.md
How to reset PG Database on Heroku?

How to reset PG Database on Heroku?

  • Step 1: heroku restart
  • Step 2: heroku pg:reset DATABASE (no need to change the DATABASE)
  • 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

@israeljrs
israeljrs / cmaf.sh
Created November 13, 2019 14:14 — forked from GnaphronG/cmaf.sh
HLS and DASH Manifest with CMAF files
#! /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
@israeljrs
israeljrs / dropzone_controller.js
Created August 24, 2019 11:59 — forked from lazaronixon/_form.html.erb
Dropzone.js + Stimulus + Active Storage
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()
@israeljrs
israeljrs / git-update-fork.sh
Created August 19, 2019 18:19 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream
@israeljrs
israeljrs / 20101004063749_create_photos.rb
Created August 6, 2019 17:18 — forked from macek/20101004063749_create_photos.rb
How to save uploaded files to your database in Rails
# db/migrate/20101004063749_create_photos.rb
class CreatePhotos < ActiveRecord::Migration
def self.up
create_table :photos do |t|
t.string :name, :null => false
t.binary :data, :null => false
t.string :filename
t.string :mime_type
t.timestamps