Skip to content

Instantly share code, notes, and snippets.

View markwylde's full-sized avatar

Mark Wylde markwylde

View GitHub Profile
package main
import (
"fmt"
"net/http"
"io/ioutil"
"os"
)
func main() {
@markwylde
markwylde / haproxy.cfg
Created December 16, 2016 15:30
Setup haproxy to proxy two apps by path
global
maxconn 4096
user haproxy
group haproxy
daemon
node lb1
spread-checks 5
defaults
log global

DeskPro - LDAP Bug

This file describes an error we have discovered while researching the DeskPro application.

The issue

When the LDAP plugin runs, it querys the LDAP server to fetch a list of all users objects.

The PHP application loops through all of the records, and then processes them. In this loop, at the very start, it moves the dataset cursor to the next record. Unfortunatly this runs before the first record has had a chance to run.

Our fix instructions

Open the file:

@markwylde
markwylde / build-coreboot-for-chromebook-c201.md
Last active December 29, 2023 17:10
Build Coreboot for ARM Chromebook - C201 Veyron Speedy

These instructions will take you through the step by step process of building and flashing a custom build of the Coreboot ROM to a Chromebook C201.

This guide expects you to have a Chromebook C201, and another ARM computer with Ubuntu installed. Specifically I used the Odroid XU2. You may be able to do this on an Intel platform, using a cross compiler. See the sidenotes section for more information.

Setting up your Ubuntu

Install dependancies

Update your Ubuntu aptitude and install the dependancies we will need.

sudo apt update
coreboot-b13b1ce bootblock Sat Nov  5 22:24:58 PDT 2016 starting...
Exception handlers installed.
Configuring PLL at ff760030 with NF = 99, NR = 2 and NO = 2 (VCO = 1188000KHz, output = 594000KHz)
Configuring PLL at ff760020 with NF = 32, NR = 1 and NO = 2 (VCO = 768000KHz, output = 384000KHz)
Translation table is @ ff700000
Mapping address range [0x00000000:0x00000000) as uncached
Creating new subtable @ff716c00 for [0xff700000:0xff800000)
Mapping address range [0xff700000:0xff718000) as writethrough
Configuring PLL at ff760000 with NF = 75, NR = 1 and NO = 1 (VCO = 1800000KHz, output = 1800000KHz)
coreboot-b13b1ce bootblock Sat Nov  5 22:24:58 PDT 2016 starting...
Exception handlers installed.
Configuring PLL at ff760030 with NF = 99, NR = 2 and NO = 2 (VCO = 1188000KHz, output = 594000KHz)
Configuring PLL at ff760020 with NF = 32, NR = 1 and NO = 2 (VCO = 768000KHz, output = 384000KHz)
Translation table is @ ff700000
Mapping address range [0x00000000:0x00000000) as uncached
Creating new subtable @ff716c00 for [0xff700000:0xff800000)
Mapping address range [0xff700000:0xff718000) as writethrough
Configuring PLL at ff760000 with NF = 75, NR = 1 and NO = 1 (VCO = 1800000KHz, output = 1800000KHz)

Example

1. Docker swarm

Make docker a one node swarm cluster.

docker swarm init

2. Create network

@markwylde
markwylde / create-swarm-cluster.sh
Last active December 10, 2021 13:06
Create a Docker Swarm cluster with a configuration amount of workers on Digital Ocean or using Virtual Box
# How many swarm workers do you want?
WORKER_COUNT="${WORKER_COUNT:-5}"
# What would you like to prefix all your VM's with?
CLUSTER_NAME="${CLUSTER_NAME:-mycluster}"
# Set this to true to use virtualbox instead of digitalocean driver
LOCAL_VIRTUALBOX="${LOCAL_VIRTUALBOX:-true}"
# Virtualbox Configuration
@markwylde
markwylde / keybase.md
Last active September 12, 2019 11:21

Keybase proof

I hereby claim:

  • I am markwylde on github.
  • I am markwylde (https://keybase.io/markwylde) on keybase.
  • I have a public key ASA4hnfu2oDRxdAsfzboxKBLlgdlmlo2zV8Tmsr3dYN6Owo

To claim this, I am signing this object:

@markwylde
markwylde / auth-config.yml
Created September 14, 2019 09:57
Auth Stack
version: "3.7"
services:
auth-ui:
image: msplat/auth-ui:local
build: ./ui/
ports:
- 9180:80
volumes:
- ./ui:/app