Skip to content

Instantly share code, notes, and snippets.

View mayanksha's full-sized avatar
🎯
Focusing

Mayank Sharma mayanksha

🎯
Focusing
View GitHub Profile
root@Task-1a $ dmidecode -t cache
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.
Handle 0x0005, DMI type 7, 19 bytes
Cache Information
Socket Designation: L1 Cache
Configuration: Enabled, Not Socketed, Level 1
Operational Mode: Write Back
@mayanksha
mayanksha / Ubuntu-16.04-Docker-Opencv3.md
Last active July 23, 2019 05:59
Docker image and setup for X11 enabled container for OpenCV3

xhost +

docker pull chennavarri/ubuntu_opencv_python

docker run --network host --ipc host --device=/dev/video0:/dev/video0 -v /tmp/.X11-unix:/tmp/.X11-unix -v $PATH_TO_ASSIGNMENT_CODE_ON_HOST:$PATH_TO_ASSIGNMENT_CODE_IN_CONTAINER -e DISPLAY=$DISPLAY -p 5000:5000 -p 8888:8888 -d -it chennavarri/ubuntu_opencv_python:latest /bin/bash

docker exec -it opencv bash

where opencv is the name of the newly created container.

@mayanksha
mayanksha / docker-setup.md
Last active February 1, 2020 06:51
Docker Cheatsheet for Development in a standard debian environment

Intentions

I wanted to have a light-weight development setup for all my development env so that I can standardize the dev environment across all developers. Earlier, I was using an Ubuntu debootstrap by chrooting into ubuntu's filesystem. Sometimes, an application would crash.

But VMs (or whole OSes) are resource intensive and clunky, plus they have to be configured differently for different systems (if they vary in specs). So, I thought of using a Docker Container as a standard development environment. This is especially useful in case I have to install a lot of dependencies to get a project to work. I don't have to pollute my host at all, and I get the added benefit of being able to edit the file in host, while executing the programs in docker containers.

Steps to do it.

Fetch your favourite distro's Dockerfile from Docker Hub, and then do docker build . in the dir. Once you're done building image, run a container in detached mode (so that it can be later started, and reused). We also want t

@mayanksha
mayanksha / PinConfigOverride_all.txt
Created September 28, 2018 10:38
PinConfigOverride output combined into 1 single file
~~~~PinConfigOverride001.txt~~~~
HDA Verb Converter
<00371C10 00371D40 00371E00 00371F00 00571C20 00571D50 00571E80 00571F00>
~~~~PinConfigOverride002.txt~~~~
HDA Verb Converter
<01271CC0 01271D01 01271EA6 01271FB7 01371C00 01371D00 01371E00 01371F40 01471C10 01471D01 01471E17 01471F90 01671CF0 01671D11 01671E11 01671F41 01771CF0 01771D11 01771E11 01771F41 01871CF0 01871D11 01871E11 01871F41 01971C40 01971D10 01971EA1 01971F03 01A71CF0 01A71D11 01A71E11 01A71F41 01B71CF0 01B71D11 01B71E11 01B71F41 01D71C01 01D71D00 01D71E60 01D71F40 01E71CF0 01E71D11 01E71E11 01E71F41 02171C20 02171D10 02171E21 02171F03>