Skip to content

Instantly share code, notes, and snippets.

<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@m-bers
m-bers / acso.sh
Last active June 12, 2023 00:46
ACSO patch for Ubuntu mainline kernel (tested on 5.4.0-33-generic)
#!/bin/bash
# VFIO ACS override patch script for Ubuntu
(tested on focal 5.4.0-33-generic), based on https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel with patch spliced from https://gitlab.com/Queuecumber/linux-acs-override and
sudo add-apt-repository -s "deb http://us.archive.ubuntu.com/ubuntu $(lsb_release -cs) main"
sudo add-apt-repository -s "deb http://us.archive.ubuntu.com/ubuntu $(lsb_release -cs)-updates main"
sudo apt update && sudo apt dist-upgrade -y
sudo apt build-dep -y linux linux-image-$(uname -r)
sudo apt install -y libncurses-dev flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf git fakeroot
mkdir acso
diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c
index 6ba5bf0..a5d3573 100644
--- a/src/cpu/cpu_arm.c
+++ b/src/cpu/cpu_arm.c
@@ -21,7 +21,7 @@
*/
#include <config.h>
-#if defined(__aarch64__)
+#if defined(__aarch64__) && (defined(WITH_GETAUXVAL) || defined(WITH_ELF_AUX_INFO))
#!/bin/bash
# This is a simple script that will allow you to edit non-owned/writable files with vscode without running vscode as sudo
# I put it in /home/$USER/bin/sudocode (run "source ~/.profile" to add ~/bin to your PATH)
{
sourcepermissions=$(stat --format '%a' $1); \
sourceuser=$(stat -c '%U' $1); \
sourcegroup=$(stat -c '%G' $1); \
sudo chmod 777 $1; \
sudo chown "${USER}:${USER}" $1; \
#!/bin/bash
set -x
USER="josh"
DISK="/dev/sda" #
TZ="America/Los_Angeles" # Timezone
GH="m-bers" # GitHub username (for SSH key import)
# Format $DISK with LVM (500Mb EFI, )
@m-bers
m-bers / dot.sh
Last active March 29, 2021 02:56
#!/bin/zsh
echo ".dot" >> .gitignore
git clone https://github.com/m-bers/dotfiles.git $HOME/.dot
alias dot='/usr/bin/git --git-dir=$HOME/.dot/.git --work-tree=$HOME'
dot config --local status.showUntrackedFiles no
dot checkout $HOME --track origin/dot
dot submodule update --init --recursive
source ~/.zshrc
@m-bers
m-bers / hvf.patch
Created March 29, 2021 14:40
hvf patch
diff --git a/accel/hvf/entitlements.plist b/accel/hvf/entitlements.plist
new file mode 100644
index 000000000..154f3308e
--- /dev/null
+++ b/accel/hvf/entitlements.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
@m-bers
m-bers / ArchLinuxARM-M1
Created October 23, 2021 06:47 — forked from thalamus/ArchLinuxARM-M1
How to boot Arch Linux ARM in QEMU (patched for M1)
/*
* This document is provided to the public domain under the
* terms of the Creative Commons CC0 public domain license
*/
How to boot Arch Linux ARM in QEMU (patched for M1)
Prerequisites:
QEMU - patched for M1 processors - patches: https://github.com/utmapp/qemu
{
"info": {
"description": "Swagger auto-generated from learnt schema for ves-io-j-chambers-j-chambers-arcadia-http-lb",
"title": "ves-io-j-chambers-j-chambers-arcadia-http-lb",
"version": "2022-07-01 03:09:03"
},
"paths": {
"/": {
"get": {
"consumes": [
# UDF Console steps:
# In the sidebar, click Deployments, then click Create Deployment in the top right
# Set provider to UDF and give the deployment a name
# Open the new deployment, click "Cloud Accounts", then "Add AWS Cloud Account"
# Click Components, then Systems, then Add.
# Choose template Ubuntu 20.04 LTS Server
# Set to 4 vCPUs, 15GB RAM, 370GB Disk, then click Create
# Click start, and select n1-standard-4 as the deployment size
# SSH into the Ubuntu VM once started