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";
//Extracted 1/10/2022 from my COVID-CO2-tracker project, in case they're useful to anybody. I'm gonna file an issue/suggesting a few places, and it seems polite to dump it here rather than a long preformatted bit in an issue. | |
export const GENERIC_GATT_SERVICE_SHORT_ID_DESCRIPTIONS = new Map([ | |
//these are hex strings, without the 0x. Chrome zero extends the devices... so 0x1800 becomes 0x00001800. | |
// This is a hack to make things easy. | |
['1800', "generic_access"], | |
['1801', "generic_attribute"], | |
['1802', "immediate_alert"], | |
['1803', "link_loss"], |
** Step 1 **
Install ffmpeg with the vidstab plugin.
brew install ffmpeg --with-libvidstab
<?php | |
/** | |
* Polylang Shortcode - https://wordpress.org/plugins/polylang/ | |
* Add this code in your functions.php | |
* Put shortcode [polylang_langswitcher] to post/page for display flags | |
* | |
* @return string | |
*/ | |
function custom_polylang_langswitcher() { | |
$output = ''; |
Use Python to:
#!/usr/bin/perl -w | |
# act as a KSysGuard sensor | |
# provides NVIDIA GPU info via `nvidia-settings` | |
# Usage (e.g. add gpu temperature sensor) | |
# 1. save this file, make sure it has a exec permission | |
# 2. in KSysGuard's menu, open `File` -> `Monitor Remote Machine` | |
# 3.1 in new dialog, type `Host` whatever you want | |
# 3.2 set `Connection Type` to `Custom command` |
using Compat | |
# using Suppressor | |
using OhMyREPL | |
const SEPARATOR = "\n\n" * "#"^80 * "\n\n" | |
ENV["PYTHON"] = "" | |
ENV["JULIA_WARN_COLOR"] = :yellow | |
ENV["JULIA_INFO_COLOR"] = :cyan | |
# ENV["LISP_PROMPT_TEXT"] = "λ ↦ " |
%{ | |
#include "brainfuck.tab.h" | |
#include <string.h> | |
#include <stdlib.h> | |
void error() | |
{ | |
fprintf(stdout, "Plik niepoprawny pod wzglêdem leksykalnym. Linia: %d\n", yylineno); | |
exit(1); | |
} |