- Follow https://libcamera.org/getting-started.html to install libcamera on your native machine.
- Clone latest media_tree using:
git clone git://linuxtv.org/media_tree.git
- Install virtme:
pip3 install --user git+https://github.com/ezequielgarcia/virtme.git
- Compile Kernel with Virtme:
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
#!/usr/bin/env python3 | |
# https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt | |
with open('/tmp/english.txt', 'r') as f: | |
bips = f.readlines() | |
short_bips = [] | |
# 442 unique words (all 4-character words) | |
for n in range(2048): |
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
# `parallel <cmd...>` works similarly to `<cmd...> &` but limits the | |
# maximum job count to prevent over-zealous memory consumption when | |
# batch processing huge numbers of files. | |
parallel () { | |
while [ "$(jobs | wc -l)" -ge $((3 * $(nproc) / 2)) ] | |
do | |
wait -n | |
done | |
"$@" & | |
} |
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
--- | |
BasedOnStyle: LLVM | |
Language: Cpp | |
IndentWidth: 8 | |
UseTab: Always | |
BreakBeforeBraces: Linux | |
AlwaysBreakBeforeMultilineStrings: true | |
AllowShortIfStatementsOnASingleLine: false | |
AllowShortLoopsOnASingleLine: false | |
AllowShortFunctionsOnASingleLine: false |
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
# /etc/systemd/network/eth.network | |
# Pass nfsroot=... on the kernel command line as you'd expect | |
[Match] | |
Name=eth* | |
KernelCommandLine=!nfsroot | |
[Network] | |
DHCP=v4 | |
[DHCPv4] |
Warning: work in progress. Incomplete
People who have been in security a long time (or even not that long) know that some inputs should be treated
as tainted. For example, environment variables from a user should not be used in a
set-uid program, inputs from a different user should be validated, etc...
Traditionally we say that the environment of a set-uid program is tainted
and
should not be used (or used with much care).
Therefore we want all set-uid/set-gid programs to treat their environment and user inputs as tainted.
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
apt-get install rsync | |
nano /root/.ssh/authorized_keys | |
prefix key with | |
command="rrsync -ro ~/rsyncbackup/",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding | |
mkdir /root/rsyncbackup | |
cd /root/rsyncbackup | |
ln -s /backup | |
gunzip /usr/share/doc/rsync/scripts/rrsync.gz -c > /usr/local/bin/rrsync | |
chmod +x /usr/local/bin/rrsync |
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
To get Git to diff between your odt/odp/ods files you will need to do the following things: | |
Install a conversion tool | |
$ sudo yum install odt2txt | |
Create your git config info directory if it's not already there | |
$ mkdir -p ~/.config/git/info | |
Add in attributes (you can paste this straight in or edit the file accordingly) | |
$ cat > ~/.config/git/info/attributes <<DELIM |
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
#!/usr/bin/python | |
#based on the ideas from http://synack.me/blog/implementing-http-live-streaming | |
# Updates: | |
# - 2024-04-24: Apply suggestions from @Pin80 | |
# Run this script and then launch the following pipeline: | |
# gst-launch videotestsrc pattern=ball ! video/x-raw-rgb, framerate=15/1, width=640, height=480 ! jpegenc ! multipartmux boundary=spionisto ! tcpclientsink port=9999 | |
#updated command line | |
#gst-launch-1.0 videotestsrc pattern=ball ! videoconvert ! video/x-raw, framerate=15/1, width=640, height=480 ! jpegenc ! multipartmux boundary=spionisto ! #tcpclientsink port=9999 | |
from multiprocessing import Queue |
NewerOlder