Skip to content

Instantly share code, notes, and snippets.

View addisaden's full-sized avatar
🔍
Research Trip

addisaden addisaden

🔍
Research Trip
View GitHub Profile
@addisaden
addisaden / cv2_udp.py
Last active November 25, 2019 02:54
get an unbreakable (well everything is breakable) streaminput in opencv python. this could be a replacement for the rtsp streaming which are really fragile if used in VideoCapture
#!/bin/env python3
#-*- encoding: utf-8 -*-
import cv2
import numpy as np
# start this:
# ffmpeg -i /dev/video0 -f mpegts udp://localhost:1337
# ffmpeg -i rtsp://... -f mpegts udp://localhost:1337
@vmrob
vmrob / channel.cpp
Last active March 29, 2021 23:40
Go channels in C++
#include <future>
#include <iostream>
#include <thread>
#include <queue>
template <typename T>
class concurrent_queue {
private:
std::queue<T> _queue;
std::mutex _mutex;
@jppommet
jppommet / int2ip.js
Last active November 5, 2024 08:56
javascript conversion from ip address to long integer and vice versa
function int2ip (ipInt) {
return ( (ipInt>>>24) +'.' + (ipInt>>16 & 255) +'.' + (ipInt>>8 & 255) +'.' + (ipInt & 255) );
}
@addisaden
addisaden / todo
Last active December 12, 2015 01:38
#!/usr/bin/env ruby
#encoding: utf-8
require "readline"
require "yaml"
require "drb/drb"
module Todo
class List
def serve
@addisaden
addisaden / durchsuche_pdfs.rb
Created September 14, 2012 12:06
search keywords in a lot of Pdfs
require "pdf-reader"
dateiname = []
print "Bitte geben Sie die zu suchenden Worte ein: "
words = gets.strip.split(/\s+/mi).collect { |w|
dateiname << w
Regexp.new(w.to_s, Regexp::MULTILINE + Regexp::IGNORECASE)
}

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: