Skip to content

Instantly share code, notes, and snippets.

View carzacc's full-sized avatar

Carmine Zaccagnino carzacc

View GitHub Profile
@carzacc
carzacc / .1tutorial.md
Last active October 3, 2023 12:48
Kernel hacking project notes

Possible Errors and How to Solve Them

This section acts as a Table of Contents of sorts for this document. It lists some of the errors you might encounter (those I encountered at least) and how to fix them.

  • failure to compile Jailhouse with errors like ERROR: modpost: "ioremap_page_range" [driver/jailhouse.ko] undefined!: you are not running a Jailhouse-enabling kernel and haven't specified a different kernel source to bind to: refer to this section and this section.
  • failure to compile the kernel: check whether you used the correct options in the .config file. In this gist you can find a working config and refer to this section.
  • failure to boot the board with a custom kernel: check whether the kernel you are running contains the NVIDIA Jetson patches (refer to this section)
  • failure to use I/O
@carzacc
carzacc / example.dart
Last active December 13, 2022 19:38
Flutter Modena Dart Examples
// abstract classes and generics just like in any "real" OOP language
abstract class Accumulator<T> {
void add(T el);
void printState();
}
class ListAccumulator<T> extends Accumulator<T> {
// constructor with implicit initializers!
ListAccumulator({this.state = const []});
apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration
kubernetesVersion: v1.24.0
controllerManager:
extraArgs: # specify a R/W directory for FlexVolumes (cluster won't work without this even though we use PVs)
flex-volume-plugin-dir: "/etc/kubernetes/kubelet-plugins/volume/exec"
networking: # pod subnet definition
podSubnet: 10.244.0.0/16
---
apiVersion: kubeadm.k8s.io/v1beta3
@carzacc
carzacc / main.dart
Last active December 30, 2020 15:45
Flutter Web Tutorial
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'dart:html' show window;
import 'dart:convert' show json, base64, ascii;
const SERVER_IP = 'http://localhost:5000';
void main() {
runApp(MyApp());
@carzacc
carzacc / index.js
Created April 27, 2020 18:23
Flutter Web JWT backend Node
var express = require('express');
var jwt = require('jsonwebtoken');
var sqlite = require('sqlite3');
var crypto = require('crypto');
var cookieParser = require("cookie-parser");
const KEY = "m yincredibl y(!!1!11!)<'SECRET>)Key'!";
var db = new sqlite.Database("users.sqlite3");
@carzacc
carzacc / main.dart
Last active April 1, 2020 15:42
Full responsive Flutter responsive Web app example
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(context) =>
MaterialApp(
initialRoute: "/login",
routes: {
@carzacc
carzacc / main.dart
Last active March 2, 2021 06:16
Example Flutter responsive layout login page
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(context) =>
MaterialApp(
home: LoginPage()
);
@carzacc
carzacc / main.dart
Created March 30, 2020 20:01
Example Flutter Web App showing a drawer on smaller screens and showing a menu on the left on bigger screens
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(context) => MaterialApp(
home: HomePage()
);
}
@carzacc
carzacc / main.dart
Last active August 17, 2022 04:28
Example Flutter Web app using GridView.builder with a SliverGridDelegateWithMaxCrossAxisExtent
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(context) =>
MaterialApp(
home: MyHomePage()
);
@carzacc
carzacc / main.dart
Last active August 10, 2022 09:22
Example Flutter Web app with a responsive GridView
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(context) =>
MaterialApp(
home: MyHomePage()
);