Skip to content

Instantly share code, notes, and snippets.

View moeiscool's full-sized avatar
💭
Find me on Gitlab.com!

Moe moeiscool

💭
Find me on Gitlab.com!
View GitHub Profile
@mitchross
mitchross / main.dart
Last active February 17, 2020 17:25
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter_vlc_player/vlc_player.dart';
import 'package:flutter_vlc_player/vlc_player_controller.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
@mattgorecki
mattgorecki / socketio.py
Created November 18, 2011 03:23
Sending an event to a node.js socket.io server from Python.
import websocket
import thread
import time
import sys
from urllib import *
class SocketIO:
def __init__(self):
self.PORT = 5000
self.HOSTNAME = '127.0.0.1'
@muendelezaji
muendelezaji / build-tensorflow.sh
Last active December 1, 2021 19:27 — forked from PatWie/update-tensorflow.sh
Script to build TensorFlow from source. Platform is ARM64 (aka aarch64) with OpenCL support via Codeplay SYCL SDK
#!/bin/bash
# =============================================================
# UPDATE SOURCE
# =============================================================
# git clone https://github.com/tensorflow/tensorflow
# git checkout -- .
# git pull origin master
# TF_BRANCH=r1.8
TF_ROOT=/home/tensorflow
@Jiab77
Jiab77 / ffmpeg.md
Last active August 9, 2022 21:40
Compilation FFMpeg / NVENC + QSV + VAAPI + VDPAU + OpenCL

Compilation FFMpeg / NVENC + NVRESIZE + QSV + VAAPI + VDPAU + OpenCL

nVidia nvresize patch is outdated and not more compatible to the latest version of FFmpeg, so it's not included in this documentation.

(even if I've passed a lot of time at trying to make it compile... without any success)

Please don't rely on this page: https://developer.nvidia.com/ffmpeg, the implementation is a hack and was never been added to the main FFmpeg tree.

See:

@jgornick
jgornick / gist:3786127
Created September 26, 2012 04:47
JavaScript: Parse multiple JSON documents from string
/**
* Parses a string containing one or multiple JSON encoded objects in the string.
* The result is always an array of objects.
*
* @param {String} data
* @return {Array}
*/
function parseJson(data) {
data = data.replace('\n', '', 'g');
@Brainiarc7
Brainiarc7 / ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
Last active May 5, 2023 01:51
FFMpeg's playbook: Advanced encoding options with hardware-accelerated acceleration for both NVIDIA NVENC's and Intel's VAAPI-based hardware encoders in both ffmpeg and libav.

FFmpeg and libav's playbook: Advanced encoding options with hardware-based acceleration, NVIDIA's NVENC and Intel's VAAPI-based encoder.

Hello guys,

Continuing from this guide to building ffmpeg and libav with NVENC and VAAPI enabled, this snippet will cover advanced options that you can use with ffmpeg and libav on both NVENC and VAAPI hardware-based encoders.

For ffmpeg:

@aruld
aruld / foreachlistset.dart
Created October 19, 2011 18:30
Dart forEach() on a List/Set
main() {
List<String> list = new List<String>();
list.add('one');
list.add('two');
list.add('twelve');
list.forEach((element) => print(element));
Set<String> set = Set.from(list);
set.forEach((element) => print(element));
}
@kevinGodell
kevinGodell / mpeg-dash-ffmpeg-dashjs.md
Created September 20, 2017 22:53
Use ffmpeg to connect to an ip cctv camera and create video files on the fly that can be viewed in an mpeg-dash compatible browser using dash.js and an html5 video element.

Live streaming mpeg-dash video using ffmpeg and dash.js

Use ffmpeg to connect to an ip cctv camera and create video files on the fly that can be viewed in an mpeg-dash compatible browser using dash.js and an html5 video element.

Prerequisites

A linux server, such as Ubuntu

Apache web server installed, running, and reachable via its ip address
@pliablepixels
pliablepixels / NVIDIA GPU CUDA 10.1 Ubuntu 18.md
Last active August 23, 2023 10:28
All the stuff to get CUDA 10.1 working with NVIDIA GPUs on Ubuntu 18.04. My notes.

All the stuff to get CUDA 10.1 working with NVIDIA GPUs on Ubuntu 18.04. My notes.

Step 1: Install NVIDIA Driver

  • sudo apt install nvidia-driver-430
  • reboot
  • run nvidia-smi. If it does not show your GPU, stop, fix. If this doesn't work, nothing else will (the rest of the stuff will compile, but won't work)
@xdamman
xdamman / install_ffmpeg_ubuntu.sh
Created July 2, 2014 21:03
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update