Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

root@plex:~# /native/usr/sbin/dtrace -s testinotify.d
dtrace: script 'testinotify.d' matched 4 probes
CPU ID FUNCTION:NAME
20 2932 read:return struct inotify_event {
int32_t wd = 0x242
uint32_t mask = 0x8
uint32_t cookie = 0
uint32_t len = 0x10
char [0] name = [ ]
}
@papertigers
papertigers / xcode-build-bump.sh
Created January 29, 2017 04:11 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
root@plex:/usr/lib/plexmediaserver# ls
CrashUploader libboost_iostreams.so.1.59.0 libdrm_intel.so.1 libgnsdk_lookup_local.so.3.07.7 libgnsdk_rhythm.so.3.07.7 libminizip.so.1 libswscale.so.4 Plex DLNA Server
dri libboost_locale.so.1.59.0 libdrm.so.2 libgnsdk_lookup_localstream.so.3.07.7 libgnsdk_storage_sqlite.so.3.07.7 libnatpmp.so.1 libtag.so.1 Plex Media Scanner
libavcodec.so.57 libboost_program_options.so.1.59.0 libexpat.so.1 libgnsdk_manager.so.3.07.7 libgnsdk_submit.so.3.07.7 libopencv_core.so.2.4 libva-drm.so.1 Plex Media Server
libavformat.so.57 libboost_regex.so.1.59.0 libexslt.so.0 libgnsdk_moodgrid.so.3.07.7 libgnsdk_tocgen.so.3.07.7 libopencv_imgproc.so.2.4 libva.so.1 Plex Media Server Tests
lib
@papertigers
papertigers / no_compute_resources_available.md
Created November 22, 2016 22:32
Diagnosing "No Compute Resources Available" messages in Triton.

No Compute Resources Available

This error is somewhat ambiguious because there is seemingly no indication which resource is exhausted.

Triton chooses compute nodes with a subcomponent called sdc-designation (also refered to as , DAPI). The full DAPI log for a provision job is embedded in the CNAPI log file and can be extracted with the workflow job uuid and the following script.

#!/bin/bash

set -o errexit
@papertigers
papertigers / diff.swift
Created November 15, 2016 04:57 — forked from simme/diff.swift
Utility for diffing two arrays of arrays.
enum DiffModification<T: Equatable> {
case inserted(position: NSIndexPath, value: T)
case deleted(position: NSIndexPath, value: T)
case moved(position: NSIndexPath, newPosition: NSIndexPath, value: T)
}
extension DiffModification: CustomDebugStringConvertible {
var debugDescription: String {
switch self {
case .inserted(let position, let value):
[link@e0b46710-17df-ed68-a519-edb83e2cc01e ~/smartos-live/projects/illumos/usr/src/uts/common/brand/lx/syscall]$ git diff lx_fcntl.c old.c
diff --git a/usr/src/uts/common/brand/lx/syscall/lx_fcntl.c b/usr/src/uts/common/brand/lx/syscall/lx_fcntl.c
index 2699b9b..9edbd6c 100644
--- a/usr/src/uts/common/brand/lx/syscall/lx_fcntl.c
+++ b/usr/src/uts/common/brand/lx/syscall/lx_fcntl.c
@@ -173,25 +173,30 @@ lx_fcntl_getfl(int fd)
return (rc);
}
+#define LX_SETFL_MASK (O_NONBLOCK | O_APPEND | O_SYNC | FASYNC);
$ docker pull alpine
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/library/alpine/manifests/latest: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Falpine%3Apull&service=registry.docker.io: dial tcp: lookup auth.docker.io on 192.168.65.1:53: no such host
root@plex:~# uname -a
Linux plex 3.13.0 BrandZ virtual linux x86_64 x86_64 x86_64 GNU/Linux
root@plex:~# /native/usr/bin/uname -a
SunOS plex 5.11 joyent_20160524T122512Z i86pc i386 i86pc
root@plex:~# cat /etc/issue
Ubuntu 14.04.4 LTS \n \l
root@plex:~# /native/usr/sbin/dtrace -n 'lx-syscall:::entry {@[probefunc] = count()}' -c "ls"
dtrace: description 'lx-syscall:::entry ' matched 676 probes
HDHRViewerV2-beta-0.05.zip Music plex.deb src test upgrade-plex
2015-12-23T18:04:52.641644+00:00 headnode scsi: [ID 365881 kern.info] /pci@0,0/pci8086,340c@5/pci1000,3020@0 (mpt_sas0):#012#011Log info 0x31111000 received for target 9 p0.#012#011scsi_status=0x0, ioc_status=0x804b, scsi_state=0xc
2015-12-23T18:04:52.641681+00:00 headnode scsi: [ID 243001 kern.warning] WARNING: /pci@0,0/pci8086,340c@5/pci1000,3020@0 (mpt_sas0):#012#011mptsas request inquiry page 0x83 for target:9, lun:0 failed!
2015-12-23T18:04:53.865947+00:00 headnode scsi: [ID 243001 kern.warning] WARNING: /pci@0,0/pci8086,340c@5/pci1000,3020@0 (mpt_sas0):#012#011mptsas_handle_event_sync: event 0xf, IOCStatus=0x8000, IOCLogInfo=0x31111000
2015-12-23T18:04:53.865971+00:00 headnode scsi: [ID 243001 kern.warning] WARNING: /pci@0,0/pci8086,340c@5/pci1000,3020@0 (mpt_sas0):#012#011mptsas_handle_event: IOCStatus=0x8000, IOCLogInfo=0x31111000