Skip to content

Instantly share code, notes, and snippets.

View rava-dosa's full-sized avatar

Apoorva Kumar rava-dosa

View GitHub Profile
sudo apt-get --purge remove nvidia-*
sudo apt-get autoremove
sudo apt-get update
sudo gedit /etc/modprobe.d/blacklist-nouveau.conf
paste
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
https://engineering.purdue.edu/kak/compsec/Lectures.html
http://cse.iitkgp.ac.in/~sandipc/Courses/
https://www.youtube.com/watch?v=akU1Ji8Vzdk&list=PLbMVogVj5nJRa3VKt_eyZdJ_DitCz1cvQ
@rava-dosa
rava-dosa / 0-TLDR.md
Created October 28, 2017 13:43 — forked from RichardBronosky/0-TLDR.md
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.

User 1

remote_server=172.31.0.1
git daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/ > /tmp/git-serve.log 2>&1 &
ssh -R 9418:localhost:9418 ec2-user@$remote_server
git clone git://localhost/ local-repo-name

Repo from workstation is cloned onto server.

User 2

@rava-dosa
rava-dosa / client.cpp
Created November 9, 2017 17:28 — forked from SteveRuben/client.cpp
Multiple streaming in c++ using opencv; OpenCV video streaming over TCP/IP
/**
* OpenCV video streaming over TCP/IP
* Client: Receives video from server and display it
* by Steve Tuenkam
*/
#include "opencv2/opencv.hpp"
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
  • xauth list
  • For example add apoorva/unix:$DISPLAY(0,1) MIT-MAGIC-COOKIE-1 72c0f18181c1f08a06df2f5bbaa861cc
  • copy whole line
  • sudo docker run -i -t --privileged --net=host -e DISPLAY -v /tmp/.X11-unix apoorva/weed1 bash
  • in docker image
  • apt install auth
  • xuth add (paste cookie)

taking argument

  int main(int argc,char**argv[]){}
  
@rava-dosa
rava-dosa / docker
Created December 2, 2017 03:17 — forked from joselo/docker
Docker Useful Commands
# Remove unused images
docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")
# Remove dangling images
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
# Ejecutar bash dentro de un servicio docker
$ docker-compose exec <service id> bash