Skip to content

Instantly share code, notes, and snippets.

View taesiri's full-sized avatar
😎
Keep Hacking!

Mohammad Reza Taesiri taesiri

😎
Keep Hacking!
View GitHub Profile
@taesiri
taesiri / Install_OpenCV4_CUDA10.md
Created August 15, 2020 17:40 — forked from raulqf/Install_OpenCV4_CUDA12.6_CUDNN8.9.md
How to install OpenCV 4.2 with CUDA 10.0 in Ubuntu 18.04

How to install OpenCV 4.2.0 with CUDA 10.0 in Ubuntu distro 18.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@taesiri
taesiri / get_replies.py
Created February 28, 2020 10:06 — forked from mcdickenson/get_replies.py
Extract replies to a tweet into a CSV
import csv
import tweepy
# get credentials at developer.twitter.com
auth = tweepy.OAuthHandler('API Key', 'API Secret')
auth.set_access_token('Access Token', 'Access Token Secret')
api = tweepy.API(auth)
# update these for whatever tweet you want to process replies to
@taesiri
taesiri / Hostspot.ps1
Created December 11, 2019 20:09
Windows Hotspot Creator
write-host("Ad-Hoc Creator")
write-host("Please enter an SSID") -foreground "green"
$network_name = Read-Host
write-host("Please enter a Password") -foreground "green"
$network_pass = Read-Host
write-host "Stopping current hosted network ..." -foreground "yellow"
netsh wlan stop hostednetwork
write-host "Creating new network ..."-foreground "green"
netsh wlan set hostednetwork mode=allow ssid=$network_name key=$network_pass
write-host("Starting network ...") -foreground "green"
@taesiri
taesiri / layout_2x4.json
Created October 30, 2019 05:08
i3_layout_2by4
{
"layout": "splitv",
"percent": 0.5,
"type": "con",
"nodes": [
{
"layout": "splitv",
"percent": 0.5,
"type": "con",
"nodes": [
@taesiri
taesiri / layout_4x2.json
Last active October 30, 2019 05:09
i3_layout_4by2
{
"layout": "splitv",
"percent": 0.5,
"type": "con",
"nodes": [
{
"layout": "splith",
"percent": 0.5,
"type": "con",
"nodes": [
@taesiri
taesiri / layout.json
Last active October 30, 2019 03:39
layout_2by2
{
"layout": "splitv",
"percent": 0.5,
"type": "con",
"nodes": [
{
"name": "Agent1",
"percent": 0.5,
"type": "con",
"swallows": [ {"class": "BipedalWalker"}]
@taesiri
taesiri / config
Created October 29, 2019 00:20
default i3 config file
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
@taesiri
taesiri / ffmpeg-desktop-livestreaming-nvenc-and netcat.md
Created October 25, 2019 23:59 — forked from Brainiarc7/ffmpeg-desktop-livestreaming-nvenc-and netcat.md
This gist will show you how to livestream your Linux desktop to a client via FFMpeg using a GPU-accelerated video encoder (NVENC and VAAPI-based)

Low-Latency Live Streaming for your Desktop using ffmpeg and netcat:

Preamble:

In this post I will explore how to stream a video and audio capture from one computer to another using ffmpeg and netcat, with a latency below 100ms, which is good enough for presentations and general purpose remote display tasks on a local network.

The problem:

Streaming low-latency live content is quite hard, because most software-based video codecs are designed to achieve the best compression and not best latency. This makes sense, because most movies are encoded once and decoded often, so it is a good trade-off to use more time for the encoding than the decoding.

@taesiri
taesiri / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Created October 25, 2019 23:59 — forked from Brainiarc7/ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware

Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:

Considerations to take when live streaming:

The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:

  1. Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.

  2. Set up the encoders as shown:

@taesiri
taesiri / id_rsa.pub
Created October 1, 2019 10:54
Publickey
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGnbCNw2cQF4zNbupJUuSucymhuomi1Mo+PGidZuAAUHP5r5blgPvkUfCw/Y6WDtuwq1nEGUn0oaNbdCMNaYEKgqZn9X7msMbdTWKXgI8mW+bJZoESnEVJ++cfdxRDU0aXtikRmm+VSjLOhSrKx+P4Rh2dmM+XdFTcu3nsoS3QNuGBacRLyZCHSPe5o0unBI5B565ZKUvXwI/hq8nkRHk7E5rvD+X1748wslUjYPnQrHjPTQ97OSgcnyIqDFN7Ziz20/Q9f67+Y0TZUhuZqAQuJaH3QtLxlx/OlCh5jo2N3UPXqGbT7s5LHB8+4JoaMqiB419Xs7pYt0tNlHqMS4VN