Skip to content

Instantly share code, notes, and snippets.

View sammcj's full-sized avatar
🦃

Sam sammcj

🦃
View GitHub Profile
@sammcj
sammcj / puppet-stats-slowest-functions.json
Created May 23, 2018 01:08
puppet stats slowest functions
{
"__inputs": [
{
"name": "DS_GRAPHITE-STATSD",
"label": "graphite-statsd",
"description": "",
"type": "datasource",
"pluginId": "graphite",
"pluginName": "Graphite"
}
@sammcj
sammcj / bmw_reflash_carsoft.md
Created May 10, 2018 00:41
bmw carsoft reprogram

Reprogram BMW after doing Automatic to Manual Conversion. (Based on my E36 experience)

written by Ross W, and Sam M.

This guide assumes the following:

  • You have programmed a BMW ECU/DME before using DIS or similar.
  • You are taking all the necessary safety precautions. (Fully charged battery etc…)
  • You have DIS working (We used EasyDIS 1.0, Base 44)
  • You have Ediabas (INPA, NCS Expert, IFH Serve) installed and working.

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@sammcj
sammcj / postmortem.md
Created October 17, 2017 01:20 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
$ mco federation trace dev1-0.choria
Received response from dev1-0.choria in 24ms
Reported Route:
client.choria
nats1.fed
nats3.fed
fb builder:1
nats2.choria
nats1.choria
@sammcj
sammcj / fuckihatexml.sh
Last active July 13, 2016 10:00
/etc/libvirt/qemu/windowsvm.xml and friends
#
~ # lsmod|grep vf
vfio_pci 40960 0
vfio_iommu_type1 20480 0
vfio_virqfd 16384 1 vfio_pci
vfio 28672 2 vfio_iommu_type1,vfio_pci
irqbypass 16384 2 kvm,vfio_pci
~ # virsh nodedev-dumpxml pci_0000_01_00_0
<device>
@sammcj
sammcj / high_rated_netflix.txt
Created June 26, 2016 08:01
Sam's 4-5 star rated netflix films and shows as of 26/6/2016
Sam's 4-5 star rated netflix films and shows as of 26/6/2016
https://www.netflix.com/title/80043049
https://www.netflix.com/title/70279935
https://www.netflix.com/title/70039645
https://www.netflix.com/title/80106124
https://www.netflix.com/title/70267241
https://www.netflix.com/title/80104329
https://www.netflix.com/title/631281
https://www.netflix.com/title/18002692
@sammcj
sammcj / npm_ughhhhh.txt
Created June 15, 2016 06:34
npm kernel crashes
Jun 08 14:52:06 s1-b12 kernel: ------------[ cut here ]------------
Jun 08 14:52:06 s1-b12 kernel: WARNING: CPU: 19 PID: 5566 at fs/btrfs/inode.c:9258 btrfs_destroy_inode+0x227/0x2a0 [btrfs]
Jun 08 14:52:06 s1-b12 kernel: Modules linked in: fuse ufs hfsplus hfs vfat msdos fat veth ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter xt_conntrack nf_nat nf_conntrack binfmt_misc mptctl mptbase rpcrdma sunrpc ib_isert iscsi_target_mod ib_i
Jun 08 14:52:06 s1-b12 kernel: 8250_fintek scsi_transport_iscsi edac_core ipmi_msghandler acpi_power_meter shpchp pcc_cpufreq acpi_cpufreq ip_tables ext4 jbd2 mbcache sd_mod mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm crc32c_intel serio_raw hpsa scsi_transport_sas be2net
Jun 08 14:52:06 s1-b12 kernel: CPU: 19 PID: 5566 Comm: npm Tainted: G W I 4.6.0-1.el7.elrepo.x86_64 #1
Jun 08 14:52:06 s1-b12 kernel: Hardware name: HP ProLiant BL460c G7, BIOS I27 08/
@sammcj
sammcj / xenserver_ext3_to_ext4.sh
Created May 26, 2016 05:12
Upgrade XenServer 7.0 to a supported filesystem
#!/bin/bash
# File managed by puppet
# Sam McLeod 2016
# Converts ext3 filesystems to ext4 in XenServer 7.0
# Since every XenServer 7.0 install is identical we don't need variables here
# Mount ext3 as ext4 on boot, note we're not adding discard because the SSDs are behind HP RAID
sed -i 's/ext3/ext4/g' /etc/fstab
sed -i 's/ext4 defaults/ext4 defaults,noatime/g' /etc/fstab