Skip to content

Instantly share code, notes, and snippets.

View androm3da's full-sized avatar

Brian Cain androm3da

View GitHub Profile
@george-hawkins
george-hawkins / arm64.md
Last active March 24, 2024 14:36
Running virtualized x86_64 and emulated arm64 Ubuntu cloud images using QEMU

QEMU arm64 cloud server emulation

This is basically a rehash of an original post on CNXSoft - all credit (particularly for the Virtio device arguments used below) belongs to the author of that piece.

Download the latest uefi1.img image. E.g. ubuntu-16.04-server-cloudimg-arm64-uefi1.img from https://cloud-images.ubuntu.com/releases/16.04/release/

Download the UEFI firmware image QEMU_EFI.fd from https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/

Determine your current username and get your current ssh public key:

# Building just clang-9.0 for creduce.
execute_process(
COMMAND "grep" "^processor" "/proc/cpuinfo"
COMMAND "wc" "-l"
COMMAND "tr" "-d" "'\n'"
OUTPUT_VARIABLE ncpu)
message("Building with ${ncpu} cpus")
set(LLVM_PARALLEL_COMPILE_JOBS ${ncpu} CACHE STRING "")
@billiegoose
billiegoose / mergelog.py
Created December 9, 2015 17:00 — forked from seanh/mergelog.py
A custom merge driver for git, for automatically merging my 'log.txt' file in a simplistic way.
#!/bin/env python
"""mergelog
This is a custom merge driver for git. It should be called from git
with a stanza in .git.config like this:
[merge "mergelog"]
name = A custom merge driver for my log.txt file.
driver = ~/scripts/mergelog %O %A %B %L
recursive = binary
@daniel-j-h
daniel-j-h / ld.gold.sh
Last active September 22, 2023 00:54
default to ld.gold on Ubuntu'ish
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10
update-alternatives --config ld
ld --version
GNU gold
export CPP=cpp-5 gcc-5 g++-5
env CXXFLAGS='-march=native -flto -fuse-linker-plugin' cmake .. -DCMAKE_BUILD_TYPE=Release
anonymous
anonymous / penalties
Created November 5, 2015 01:05
2009082257 (OAK, OWN 30, Q4) R.Schmitt kicks 76 yards from OAK 30 to SF -6. M.Spurlock, Touchback. PENALTY on OAK, Offside on Free Kick, 5 yards, enforced at SF 20.
2009091307 (NO, OWN 45, Q2) T.Morstead kicks 55 yards from NO 45 to end zone, Touchback. Unsportsmanlike Conduct penalty on DET#26 after touchdown was enforced on kickoff.
2009092013 (SD, OWN 30, Q2) N.Kaeding kicks 75 yards from SD 30 to BAL -5. C.Carr, Touchback. PENALTY on SD-L.Naanee, Offside on Free Kick, 5 yards, enforced at BAL 20.
2009092710 (CHI, OWN 45, Q4) Penalty on TD play enforced on kickoff. R.Gould kicks 55 yards from CHI 45 to end zone, Touchback.
2009101809 (ARI, OWN 45, Q1) Ball placed on 45 due to penalty on prior scrimmage play. N.Rackers kicks 55 yards from ARI 45 to end zone, Touchback.
2009101811 (NYJ, OWN 45, Q2) Prior penalty was enforced on the kickoff. J.Feely kicks 55 yards from NYJ 45 to end zone, Touchback.
2009112602 (DEN, OWN 30, Q1) M.Prater kicks 70 yards from DEN 30 to end zone, Touchback. PENALTY on DEN-D.Reid
@yurydelendik
yurydelendik / !wasmllvm.md
Last active May 31, 2024 06:31
Using WebAssembly in LLVM

NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception

Using WebAssembly in LLVM

Compiling

# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
@smoser
smoser / README.md
Last active February 26, 2016 17:30
py2or3: attempt at an executable allowing programs to use python2 or python3 if they'd work in both.

The Problem

During transition to python3, much code is now written that works on python2 or python3. Python 2 is becoming less common, and has even been removed from default installs of Ubuntu Server in 15.10 and going forward.

A summary of Ubuntu releases and python inclusion in the default install of Ubuntu Server:

  • 12.04 precise: python 2 only (2.7.3)
  • 14.04 trusty: python 2 only (2.7.5) and python3 (3.4.0)
  • 14.10 utopic: python 2 (2.7.8) and python3 (3.4.2)
@CAFxX
CAFxX / persistent_pipes_linux.md
Last active January 4, 2024 04:32
Persistent pipes/circular buffers for Linux

📂 Persistent "pipes" in Linux

In a project I'm working on I ran into the requirement of having some sort of persistent FIFO buffer or pipe in Linux, i.e. something file-like that could accept writes from a process and persist it to disk until a second process reads (and acknowledges) it. The persistence should be both across process restarts as well as OS restarts.

AFAICT unfortunately in the Linux world such a primitive does not exist (named pipes/FIFOs do not persist

@mnot
mnot / snowden-ietf93.md
Last active September 12, 2023 13:40
Transcript of Edward Snowden's comments at IETF93.
@semenko
semenko / dmidecode
Last active October 26, 2021 02:57
Dell XPS 13 2015 model 9343 on Ubuntu 15.04, dmidecode, lsusb, lspci
$ sudo dmidecode
# dmidecode 2.12
# SMBIOS entry point at 0x000f0000
SMBIOS 2.8 present.
<SNIP>
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information