Skip to content

Instantly share code, notes, and snippets.

View bluecmd's full-sized avatar

Christian Svensson bluecmd

  • Stockholm, Sweden
View GitHub Profile
diff -u /home/bluecmd/cert-manager/third_party/crypto/acme/acme.go ./acme.go
--- /home/bluecmd/cert-manager/third_party/crypto/acme/acme.go 2019-04-02 22:57:39.204730727 -0700
+++ ./acme.go 2019-04-05 21:23:52.370866928 -0700
@@ -255,7 +255,7 @@
// If a caller needs to poll an order until its status is final,
// see the WaitOrder method.
func (c *Client) GetOrder(ctx context.Context, url string) (*Order, error) {
- res, err := c.get(ctx, url)
+ res, err := c.postWithJWSAccount(ctx, url, nil)
if err != nil {
@bluecmd
bluecmd / run.sh
Last active June 28, 2019 10:03
AST2500 UART minimal demo
cat << _EOF_ > boot.lds
SECTIONS
{
. = 0x0;
.text : { *(.text) }
}
_EOF_
cat << _EOF_ > boot.S
.globl reset
reset:
@bluecmd
bluecmd / u16550.rs
Last active June 28, 2019 11:45
u16550.rs
use crate::model::*;
use register::mmio::{ReadOnly, ReadWrite, WriteOnly};
use register::{register_bitfields, Field};
#[allow(non_snake_case)]
#[repr(C)]
union UartRegister0 {
// Activate when DLAB = 0
UARTRBR: ReadOnly<u32, UARTRBR::Register>,
@bluecmd
bluecmd / Shell.efi
Created July 13, 2019 12:34
iPXE basic menu for home usage
From latest ShellBinPkg at https://github.com/tianocore/edk2/releases
@bluecmd
bluecmd / keybase.md
Created August 13, 2019 18:25
keybase.md

Keybase proof

I hereby claim:

  • I am bluecmd on github.
  • I am bluecmd (https://keybase.io/bluecmd) on keybase.
  • I have a public key ASD4mBXwQj6cLwEeHlcMu0zrI3hdssC-96Bcdk2m1thCbgo

To claim this, I am signing this object:

@bluecmd
bluecmd / gist:b606ac951ea2d9d901d60fc541847a55
Created October 1, 2019 12:40
Quanta Leopard DDR3 3A21
Node GUID/Name Type Size
Image 0x1000000
IFD 0x1000
GbE 0x2000
PD 0x10000
DevExp1 0x10000
ME 0x7dd000
BIOS 0x800000
FV 8C8CE578-8A3D-4F1C-9935-896185C32DD3 0x80000
File CEF5B9A3-476D-497F-9FDC-E98143E0422C EFI_FV_FILETYPE_RAW 0x7ffb8
function Verify(login_information) {
ldap := newLdapConnection()
userdn := fmt.Sprintf("uid=%s,ou=people,dc=tech,dc=dreamhack,dc=se", a.Username())
err := ldap.Bind(userdn, login_information)
if err != nil {
raise Error("Login failed")
}
// Login succeeded, get groups.
test: build-qemu/x86_64-softmmu/qemu-system-x86_64 linux/arch/x86/boot/bzImage root/sbin/init root/lib/modules/$(KERNEL)/extra/fejkon.ko
build-qemu/x86_64-softmmu/qemu-system-x86_64 \
-nographic -m 1G \
-machine q35,kernel-irqchip=split \
-device intel-iommu,intremap=on,device-iotlb=on \
-fsdev local,id=root,path=$(PWD)/root,security_model=none,writeout=immediate \
-device virtio-9p-pci,fsdev=root,mount_tag=/dev/root \
-kernel linux/arch/x86/boot/bzImage \
-device fejkon \
-append "root=hostfs rootfstype=9p rootflags=trans=virtio noinitrd console=ttyS0 loglevel=8"
1 SF 000000
1 RD 000000
1 RD 008020
1 RD 008030
1 RD 008640
1 RD 008000
1 RD 008030
1 RD 008630
1 RD 008680
1 RD 008638
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0,115200n8"
GRUB_CMDLINE_LINUX=""