- To get the
djtgcfg
tool, use official sources Note: I understand nothing about RPI and the CPU architectures involved, but the "ARM Raspberry Pi" does not work, the ARMHF architecture is expected which is not what RPI4B is. Just use the regular Linux ARM 64 bit .deb for RPI4B w/ Ubuntu - For some reason the
/dev/ttyUSB*
and/dev/serial/by-id/*
devices weren't showing up, I forgot the solution, but it can be fixed, I think I tried some first Google results i.e. somemodprobe
andecho
thing. - When the
ttyUSB*
works, you have to use thedjtgcfg
tool with root, but some error regarding permissions appears, can be investigated w/ strace. The fix is somesysctl command
This file contains hidden or 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
// You can inject any Scala.js component into any page using Chrome as follows: | |
// - This example references an arbitrary Scala.js package called bo-search | |
// - bo-search contains a top level definition BoSearch.initCit | |
// - Install CORS Unblock extension | |
// - Install Custom Style Script or Scripty extension | |
// - Disable CORS for the page | |
// - Setup a local web server to host this injection script | |
// - Use this script to inject the component into the page | |
var baseURL = "http://127.0.0.1:8080" | |
var injectUrl = baseURL + "/inject.js" // You can even just inject this URL |
VLC command:
vlc v4l2:// :input-slave=alsa:// :v4l2-standard=1 :v4l2-dev=/dev/video0 :v4l2-width=1280 :v4l2-height=720 :sout="#transcode{vcodec=theo,vb=2000,acodec=vorb,ab=128,channels=2,samplerate=44100}:http{dst=:8081/webcam.ogg}" -I dummy
Source: https://bioinfoexpert.com/blog/2016/08/09/stream-audio-video-from-webcam-using-vlc/
This file contains hidden or 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
# Nix shell info: | |
# - This shell uses the Nix package manager `https://github.com/NixOS/nix` | |
# - This shell uses the experimental `nix flake` functionality: | |
# - See `https://nixos.wiki/wiki/Flakes` | |
# - See `https://www.tweag.io/blog/2020-05-25-flakes/` | |
# - This shell usage is described not for NixOS, but for Ubuntu, however NixOS should work too | |
# - If problems arise while managing nix versions, check state of nix channels: | |
# - `nix-channel --list` | |
# - `nix-channel --help` | |
# - `env | grep nixpkgs` |
This file contains hidden or 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 bash | |
function help() { | |
echo "Usage $0 [TEMPLATE] [RENDER]" | |
echo "Replaces all instances of '\$TPL_*' in TEMPLATE and write to RENDER" | |
echo "If RENDER not provided, will print to stdout" | |
} | |
template="$1" | |
if [ -z "$template" ] |
This file contains hidden or 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 bash | |
chain_pem="${1}" | |
if [[ -z "${2}" ]]; then | |
ssl_flags="x509 -noout -text" | |
else | |
ssl_flags="${2}" | |
fi | |
echo "SSL Flags: ${ssl_flags}\n" |
Go to http://www.brain-games.com/lv/noteikumi/
In the console run this to get a list of all latvian rule download links
var lvhrefs = [];
var lvimgs = document.querySelectorAll("img[src='http://www.brain-games.com/wp-content/uploads/lv.png']")
.forEach(function(lvimg) {
lvhrefs.push(lvimg.parentElement.href)
})
This file contains hidden or 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
# Source - https://superuser.com/questions/268344/how-do-i-delete-all-but-10-newest-files-in-linux | |
# Remove all files except the newest 5 | |
preserveCount=5 | |
path="./rotate" | |
ls -1tr $path | head -n "-$preserveCount" | xargs -I {} -d '\n' rm -f $path/{} |
This file contains hidden or 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 bash | |
# Usage: | |
# | |
# # Compile main.cpp to merged_main.cpp | |
# ./merge.sh | |
# | |
# # Compile index.cpp to merged_main.cpp | |
# ./merge.sh index.cpp | |
# |
This file contains hidden or 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
-- Mergefile | |
main.cpp | |
-- main.cpp | |
#include <iostream> | |
#include "lib/LinkedList/LinkedList.h" | |
using namespace std; | |
int main() { | |
// Code here | |
} |
NewerOlder