Skip to content

Instantly share code, notes, and snippets.

@rajeshpachaikani
rajeshpachaikani / main.rs
Created November 14, 2021 11:14
Rust opencv demo
/*
Author: Rajesh Pachaikani
Contact: rajesh@makeitnow.in
*/
use opencv::{highgui, prelude::*, videoio, Result};
fn main() -> Result<()> {
let mut cam = videoio::VideoCapture::new(0, videoio::CAP_ANY)?;
highgui::named_window("window", highgui::WINDOW_FULLSCREEN)?;
@Shmarkus
Shmarkus / elk-docker-compose.yml
Last active February 1, 2022 13:41
ELK stack (version 7.16.3) Docker compose bundle
version: "3"
services:
elasticsearch:
image: elasticsearch:7.16.3
container_name: elasticsearch
restart: unless-stopped
environment:
- node.name=elasticsearch
- discovery.seed_hosts=elasticsearch
- cluster.initial_master_nodes=elasticsearch
@salex89
salex89 / docker-private-registries
Created October 13, 2016 12:35
List of private docker repositories (self-hosted and SaaS) other than Docker Hub
Portus - http://port.us.org/
Quay - https://quay.io/
Harbor - https://vmware.github.io/harbor/
Atomic Registry - http://www.projectatomic.io/registry/
Nexus Repository Manager OSS 3.xx - https://www.sonatype.com/nexus-repository-oss
"Official" Docker Registry 2.0 - https://docs.docker.com/registry/
@jmlacroix
jmlacroix / highlight.sh
Created September 15, 2011 01:40
Use VIM to output HTML-formatted syntax highlight of a file
#/bin/bash
OUTFILE=$(mktemp -t highlight)
INFILE=$1
PARAM="set nonumber"
if [ -z "$INFILE" ]
then
echo "usage: $0 source.file"
@zaius
zaius / background.sh
Created January 16, 2011 23:29
How to redirect a running process output to a file and log out
ctrl-z
bg
touch /tmp/stdout
touch /tmp/stderr
gdb -p $!
# In GDB
p dup2(open("/tmp/stdout", 1), 1)
p dup2(open("/tmp/stderr", 1), 2)
@jeremyBanks
jeremyBanks / expanded.md
Created June 22, 2010 05:10
one-line self-executing c header and expanded explanation
//

Since we don't want this visible in C, we put it in a comment.

&>/dev/null

Unfortunately // is interpreted as an invalid shell command and produces an error message, so we need to redirect that to /dev/null to get rid of it.

;x="${0%.*}"