Did you know that it is rather easy to setup a VM to test your NixOs configuration?
# flake.nix
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";| #!/usr/bin/env python3 | |
| # Usage: pager_duty.py <MM.YYYY> <User Name> | |
| # Example: ./pager_duty.py 12.2023 "Maciej Flak" | |
| import http.client | |
| import json | |
| import sys | |
| import os | |
| from datetime import datetime, timedelta |
| #![no_std] | |
| #![no_main] | |
| use aya_bpf::helpers::bpf_get_current_pid_tgid; | |
| use aya_bpf::helpers::gen::bpf_ktime_get_ns; | |
| use aya_bpf::helpers::bpf_probe_read_user_str_bytes; | |
| use aya_bpf::helpers::bpf_probe_read_kernel_str_bytes; | |
| use aya_bpf::BpfContext; | |
| use aya_bpf::{ | |
| macros::map, | |
| macros::{uprobe, uretprobe}, |
| //! ```cargo | |
| //! [dependencies] | |
| //! | |
| //! axum = "0.6.20" | |
| //! lazy_static = "1.4.0" | |
| //! serde = "1.0.183" | |
| //! serde_json = "1.0.104" | |
| //! tokio = { version = "1.30.0", features = ["full"] } | |
| //! ``` | |
| use axum::response::IntoResponse; |
| /** | |
| * Copy given string into clipboard. | |
| * | |
| * @param s string that should be copied into clipboard | |
| */ | |
| def yank(s: String) = { | |
| val stringSelection = new java.awt.datatransfer.StringSelection(s) | |
| val clipboard = java.awt.Toolkit.getDefaultToolkit().getSystemClipboard() | |
| clipboard.setContents(stringSelection, null) | |
| } |
| /* | |
| This will result in error: | |
| SQL Error [XX000]: ERROR: unable to encode table key: *tree.DJSON | |
| on insert | |
| */ | |
| CREATE TABLE json_events2 ( | |
| uuid STRING PRIMARY KEY, | |
| value JSONB, | |
| event_type STRING, |
https://linuxconfig.org/how-to-install-java-on-ubuntu-18-04-bionic-beaver-linux
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
apt search oracle-java
sudo apt install oracle-java8-set-default
java --version| #!/bin/bash | |
| DIR=~/tata | |
| FILES=$DIR/*.JPG | |
| mkdir -p workdir | |
| cp $FILES workdir -a | |
| for f in $DIR/workdir/*.JPG | |
| do | |
| echo "Processing $f file..." |