Skip to content

Instantly share code, notes, and snippets.

View osmano807's full-sized avatar

Joaquim Pedro França Simão osmano807

View GitHub Profile
@osmano807
osmano807 / app.rs
Created September 8, 2024 22:38
Leptos hydration panic
use leptos::prelude::*;
use leptos_meta::{provide_meta_context, MetaTags};
use leptos_router::{components::*, path};
use leptos::either::Either;
use serde::{Deserialize, Serialize};
pub fn shell(options: LeptosOptions) -> impl IntoView {
view! {
<!DOCTYPE html>
@osmano807
osmano807 / hardware-configuration.nix
Last active December 28, 2018 23:56
QCA9377 NixOS
{ config, lib, pkgs, ... }:
let
qca9377_firmware = pkgs.callPackage ./qca9377_firmware.nix { };
in
{
hardware.firmware = with pkgs; [
# firmwareLinuxNonfree
qca9377_firmware ];
}

Keybase proof

I hereby claim:

  • I am osmano807 on github.
  • I am joaquimpfs (https://keybase.io/joaquimpfs) on keybase.
  • I have a public key whose fingerprint is BC55 F6C9 9E75 3903 7225 B925 E21D 3284 70A3 D677

To claim this, I am signing this object:

ZPOOL_FORCE=""
zfs_mount_handler () {
local node=$1
local pool="${ZFS_DATASET%%/*}"
local zpool_import_flags=""
local rwopt_exp=${rwopt:-ro}
if [ "$rwopt_exp" != "rw" ]; then
{ config, pkgs, ... }:
{
imports = [ <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix> ];
isoImage.includeSystemBuildDependencies = true;
}
#!/bin/bash
# To let unprivileged users use the daemon, they should set the NIX_REMOTE environment variable to daemon. So you should put a line like
# Remember to start it first with root
## nix-daemon
#export NIX_REMOTE=daemon
export NIX_REMOTE=
#export NIXOS_CONFIG="`pwd`/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
export NIXOS_CONFIG="`pwd`/installation-cd-minimal-offline.nix"
export HOME="/homeless-shelter"
export NIX_BUILD_CORES="1"
export NIX_BUILD_TOP="/tmp/nix-build-perl-5.16.3.drv-3"
export NIX_ENFORCE_PURITY="1"
export NIX_INDENT_MAKE="1"
export NIX_LDFLAGS="-rpath /nix/store/5n6zpaan6q0gxdawyp1ibcg15qj8hil6-perl-5.16.3/lib64 -rpath /nix/store/5n6zpaan6q0gxdawyp1ibcg15qj8hil6-perl-5.16.3/lib "
export NIX_STORE="/nix/store"
export OLDPWD="/tmp/nix-build-perl-5.16.3.drv-3"
export PATH="/nix/store/sq6j4a0jddvcbmzv1j4ym0dy1dcghs1v-bootstrap-gcc-wrapper/bin:/nix/store/mg0hw3bbvw46q1jkmkldqs95ih3j1sb4-bootstrap-tools/bin:/nix/store/mg0hw3bbvw46q1jkmkldqs95ih3j1sb4-bootstrap-tools/bin:/nix/store/mg0hw3bbvw46q1jkmkldqs95ih3j1sb4-bootstrap-tools/bin:/nix/store/mg0hw3bbvw46q1jkmkldqs95ih3j1sb4-bootstrap-tools/bin"
export PWD="/tmp/nix-build-perl-5.16.3.drv-3/perl-5.16.3"
@osmano807
osmano807 / -
Created October 10, 2013 21:07
building /nix/store/5n6zpaan6q0gxdawyp1ibcg15qj8hil6-perl-5.16.3
unpacking sources
unpacking source archive /nix/store/m6k42d8f3a619g6lh1bwdmw9af5fg976-perl-5.16.3.tar.gz
source root is perl-5.16.3
patching sources
applying patch /nix/store/llr0rvdfcym1yvq23bwdfngi3868sgla-no-sys-dirs.patch
patching file Configure
Hunk #2 succeeded at 1315 (offset 12 lines).
Hunk #3 succeeded at 1326 with fuzz 1 (offset 7 lines).
Hunk #4 succeeded at 1366 (offset 9 lines).
-rw-r--r-- root/root 591 .PKGINFO
-rw-r--r-- root/root 433 .INSTALL
drwxr-xr-x root/root 0 bin/
-rwxr-xr-x root/root 42720 bin/cat
-rwxr-xr-x root/root 63232 bin/chgrp
-rwxr-xr-x root/root 54976 bin/chmod
-rwxr-xr-x root/root 63232 bin/chown
-rwxr-xr-x root/root 104292 bin/cp
-rwxr-xr-x root/root 63172 bin/date
-rwxr-xr-x root/root 59176 bin/dd
clear all
%% Inicializando vetor de 5 elementos
for iii = 1:5
X(iii) = iii;
end
%% Calculando valor médio de vetor de 5 elementos
media = 0;
for jjj = 1:5