Skip to content

Instantly share code, notes, and snippets.

@whatisor
whatisor / Docker proxy Need 2 Do
Created August 11, 2020 03:40
Docker proxy Need 2 Do
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo nano /etc/systemd/system/docker.service.d/proxy.conf
[Service]
Environment="HTTP_PROXY=http://ip:port"
Environment="HTTPS_PROXY=http://ip:port/"
Environment="NO_PROXY="localhost,127.0.0.1,::1"
mkdir ~/.docker
nano ~/.docker/config.json
@whatisor
whatisor / fisheye2spherical.frag
Last active January 6, 2020 02:45
Fisheye to spherical conversion shader
// Fisheye to spherical conversion
// Assumes the fisheye image is square, centered, and the circle fills the image.
// Output (spherical) image should have 2:1 aspect.
// Strange (but helpful) that atan() == atan2(), normally they are different.
//Refer http://blog.yeezia.com/?post=91
kernel vec4 fish2sphere(sampler src)
{
vec2 pfish;
float theta,phi,r;
vec3 psph;
@whatisor
whatisor / RealsenseTool.hpp
Created December 31, 2019 07:32
RealsenseTool.hpp
#pragma once
#include <exception>
#include <librealsense2/rs.hpp>
#include <librealsense2/rsutil.h>
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
using namespace cv;
@whatisor
whatisor / openvino-arm.note
Created November 14, 2019 18:42
openvino-arm.note
Dont use optimization flag for compilation if use MYRIAD
@whatisor
whatisor / sift.cpp
Created August 28, 2017 06:38 — forked from lxc-xx/sift.cpp
OpenCV's SIFT implementation
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
@whatisor
whatisor / pid.cpp
Created January 6, 2016 03:47 — forked from bradley219/.gitignore
PID C++ implementation
#ifndef _PID_SOURCE_
#define _PID_SOURCE_
#include <iostream>
#include <cmath>
#include "pid.h"
using namespace std;
class PIDImpl
@whatisor
whatisor / README.md
Created December 22, 2015 10:01 — forked from bsergean/README.md
Anti-aliasing (FXAA) with headless-gl and three.js

Aliased

Anti-aliased

Getting the code