Skip to content

Instantly share code, notes, and snippets.

@williamspatrick
williamspatrick / gist:afa926a2c3f965a577e0
Created August 20, 2014 15:23
Hostboot code layout - user directory
Hardware Access / Drivers
devicefw
fsi
fsiscom
gpio
i2c
ibscom
mbox
pnor
scan
@williamspatrick
williamspatrick / gist:827361d777f47533a308
Created July 2, 2015 17:55
OpenPower v1.2.1 vs v1.4 release notes.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
main( int argc, char ** argv, char ** envp )
{
if( argc <= 1 ) {
errno = EINVAL;
perror( "insufficient arguments" );
@williamspatrick
williamspatrick / foo.C
Last active September 22, 2015 17:39
designated initializers?
using namespace std;
#include <iostream>
#include <stdint.h>
struct foo
{
int x;
int y;
};
@williamspatrick
williamspatrick / keybase.md
Created September 22, 2015 20:12
keybase.md

Keybase proof

I hereby claim:

  • I am williamspatrick on github.
  • I am williamspatrick (https://keybase.io/williamspatrick) on keybase.
  • I have a public key whose fingerprint is 0460 FD8A 2E0B 13D7 0D6E A241 AB03 47CC 2D00 C119

To claim this, I am signing this object:

@williamspatrick
williamspatrick / autobump
Last active January 27, 2017 02:36
openbmc-autobump tool
#!/usr/bin/env perl
use strict;
use File::Basename qw/basename/;
my $metas_to_search = "meta-phosphor meta-openbmc-machines meta-openbmc-bsp";
my $master_project = "openbmc";
my $server = "https://gerrit.openbmc-project.xyz";
system("cd $master_project && git fetch origin && git checkout origin/master");
#!/bin/bash
GERRIT_COMMAND="curl -s --anyauth -n https://gerrit.openbmc-project.xyz"
GITHUB_COMMAND="curl -s -n https://api.github.com"
GITHUB_TEAM=1777905
echo "Checking ${GERRIT_PROJECT}:${GERRIT_BRANCH}:${GERRIT_CHANGE_ID}:${GERRIT_PATCHSET_REVISION}"
COMMITTER_EMAIL=`${GERRIT_COMMAND}/a/changes/${GERRIT_PROJECT/\//%2F}~${GERRIT_BRANCH}~${GERRIT_CHANGE_ID}/revisions/${GERRIT_PATCHSET_REVISION}/commit | grep -Pzo "committer[^}]*" | grep -a '"email":' | sed 's/",$//' | sed 's/.*"//'`
#include <sdbusplus/server.hpp>
#include <net/poettering/Calculator/server.hpp>
namespace sdbusplus
{
namespace server
{
namespace net
{
namespace poettering
$ find -name "*.yaml" | xargs grep -- " - const"
./xyz/openbmc_project/Control/FanRedundancy.interface.yaml: - const
./xyz/openbmc_project/Control/FanRedundancy.interface.yaml: - const
./xyz/openbmc_project/Control/FanRedundancy.interface.yaml: - const
./xyz/openbmc_project/Control/PowerSupplyAttributes.interface.yaml: - const
./xyz/openbmc_project/Control/PowerSupplyRedundancy.interface.yaml: - const
./xyz/openbmc_project/Control/ThermalMode.interface.yaml: - const
./xyz/openbmc_project/Network/EthernetInterface.interface.yaml: - const
./xyz/openbmc_project/User/Manager.interface.yaml: - const
./xyz/openbmc_project/User/Manager.interface.yaml: - const