Skip to content

Instantly share code, notes, and snippets.

View fabiojose's full-sized avatar
🎯
Focusing

Fabio Jose fabiojose

🎯
Focusing
  • São Paulo, Brazil
  • 11:56 (UTC -03:00)
View GitHub Profile
@danielgross
danielgross / mathpix2gpt.py
Last active April 22, 2024 05:19
mathpix2gpt.py
import requests
import time
import os
import sys
import openai
import tiktoken
from termcolor import colored
openai.api_key = open(os.path.expanduser('~/.openai')).read().strip()
@ktosiu
ktosiu / ffmpeg_stream.md
Created August 25, 2020 09:11 — forked from docPhil99/ffmpeg_stream.md
Streaming FFmpeg and Python

This is running on Linux Mint

  1. Install ffmpeg
sudo apt-get install ffmpeg
  1. A simple test: open two terminals, in first run ffplay udp://127.0.0.1:23000 and in the second ffmpeg -i sample.mp4 -vcodec mpeg4 -f mpegts udp://127.0.0.1:23000 . This should play the video sample.mp4 although the quality is rather blocky.
@alexishida
alexishida / rtsp-intelbras-outros.txt
Last active April 5, 2024 17:34
RTSP dvr intelbras e outros
-------- Intelbras -------------------------------------------------------
rtsp://usuário:senha@ip:porta/cam/realmonitor?channel=1&subtype=0
-------- Luxvision -------------------------------------------------------
rtsp://ip:porta/user=[usuário]&password=[senha]&channel=1&stream=0.sdp
-------- Hikvision -------------------------------------------------------
rtsp://usuário:senha@ip:porta/Streaming/Channels/102
@rbramley
rbramley / CloudEvents-0.1.avsc
Created April 6, 2018 17:07
CloudEvents 0.1 Avro schema (draft)
{
"namespace": "CloudEvents",
"type": "record",
"name": "Event",
"fields": [
{"name": "cloudEventsVersion", "type": "string", "doc": "The version of the CloudEvents specification which the event uses. This enables the interpretation of the context."},
{"name": "eventType", "type": "string", "doc": "Type of the event data. Producers can specify the format of this, depending on their service. This enables the interpretation of data, and can be used for routing, policy and more."},
{"name": "eventTypeVersion", "type": ["null", "string"], "doc": "The version of the event-type. This enables the interpretation of data by eventual consumers, requires the consumer to be knowledgeable about the producer."},
{"name": "source", "type": "string", "doc": "This describes the event producer. Often this will include information such as the type of the event source, the organization publishing the event, and some unique idenfitiers. The exact syntax and semantics behind the data encoded in the URI is e
@dorajistyle
dorajistyle / ubuntu_agnoster_install.md
Created January 17, 2017 13:27 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 14.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active April 14, 2024 15:39
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@eyecatchup
eyecatchup / git-commit-log-stats.md
Last active April 25, 2024 13:54
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@darrenpmeyer
darrenpmeyer / autobuild-openconnect-7-ubuntu.sh
Last active June 10, 2020 16:22
Autobuild script for OpenConnect 7 (Ubuntu 14/15/16 trusty/vivid/xenial)
#!/usr/bin/env bash
## NOTE! OpenConnect is now on Version 8, and this is only for historical use
## See https://gist.github.com/darrenpmeyer/1a56d0d4817352998fe9d7cfe5a79684 for new script
oc_ver="7.08"
echo "Autobuild OpenConnect $oc_ver"
echo " "
echo "This script uses apt-get and make install via sudo rights"
echo "To simplify this, we're going to use sudo -v to pre-authenticate you"
@darrenpmeyer
darrenpmeyer / openconnect-7-ubuntu-build.md
Last active June 10, 2020 16:24
Building OpenConnect 7 on Ubuntu 14 (trusty), 15 (vivid), and 16 (xenial)
@lalyos
lalyos / hack-docker-hosts.sh
Last active May 28, 2017 14:25
hacking docker /etc/hosts file to writable
cp /etc/hosts /tmp/hosts
#vi /tmp/hosts
mkdir -p -- /lib-override && cp /lib64/libnss_files.so.2 /lib-override
sed -i.bak 's:/etc/hosts:/tmp/hosts:g' /lib-override/libnss_files.so.2
export LD_LIBRARY_PATH=/lib-override