- find the Camera entry in dmesg output, use e.g. grep <your camera brand/type> BisonCam in my case
Bus 001 Device 002: ID 5986:9102 Acer, Inc BisonCam,NB Pro
- use vendor:productid to create entry in script e.g.
/etc/udev/rules.d/40-disable-internal-webcam.rules
ATTRS{idVendor}=="5986", ATTRS{idProduct}=="9102", RUN="/bin/sh -c 'echo 0 >/sys/$devpath/authorized'"
- reboot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function listAllProperties(o) { | |
var objectToInspect; | |
var result = []; | |
for(objectToInspect = o; objectToInspect !== null; objectToInspect = Object.getPrototypeOf(objectToInspect)){ | |
result = result.concat(Object.getOwnPropertyNames(objectToInspect)); | |
} | |
return result; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef _WIN32 | |
#include <malloc.h> | |
#endif | |
#include <cstdint> | |
#include <vector> | |
#include <iostream> | |
/** | |
* Allocator for aligned data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
*/ | |
#include <arpa/inet.h> | |
#include <linux/if_packet.h> | |
#include <linux/ip.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
*/ | |
#include <arpa/inet.h> | |
#include <linux/if_packet.h> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Select lines visually: Shift + v | |
2) type following command: '<,'>s/^/\=line(".")-line("'<")+1.". "/ | |
\= evaluate expression | |
line(".") line number of each selected line | |
line("'<") line number of the first line in the selection | |
. concatenation operator | |
". " concatenated string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use Ctrl-V-* where * = control character e.g M (Carriage Return) to type control characters in macros e.g. | |
s/\[code.*\]/```cpp/g^M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use Ctrl-V-* where * = control character e.g M (Carriage Return) to type control characters in macros e.g. | |
s/\[code.*\]/```cpp/g^M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command! -nargs=0 -complete=command CodeBlock execute '%s/\[code.*\]/```cpp/g | %s/\[\/code.*\]/```/g' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install sg3-utils | |
sudo sg_raw /dev/sr0 EA 00 00 00 00 00 01 | |
OR add file to /etc/udev/rules.d | |
# Apple's USB SuperDrive | |
ACTION=="add", ATTRS{idProduct}=="1500", ATTRS{idVendor}=="05ac", DRIVERS=="usb", RUN+="/usr/bin/sg_raw /dev/$kernel EA 00 00 00 00 00 01 |