Skip to content

Instantly share code, notes, and snippets.

@johnp789
johnp789 / Vagrantfile
Created October 30, 2020 18:13
nomad large batch of small tasks test
# -*- mode: ruby -*-
# # vi: set ft=ruby :
Vagrant.require_version ">= 1.6.0"
VAGRANTFILE_API_VERSION = "2"
servers = [
{
"name" => "nomad-server",
"ram" => "3072",
@johnp789
johnp789 / keybase.md
Created May 7, 2018 01:49
Keybase proof

Keybase proof I hereby claim:

  • I am johnp789 on github.
  • I am johnpitney (https://keybase.io/johnpitney) on keybase.
  • I have a public key ASAyh33GrZ-UytIVd21UngmDVGb9aK96hkAI-1dPVZ6Iugo

To claim this, I am signing this object:

{
import os
import sys
from evdev import UInput, ecodes, AbsInfo
PEN_MAX_X = 1 << 16 - 1
PEN_MAX_Y = 1 << 16 - 1
PEN_MAX_Z = 8191
RESOLUTION = 5080
#pressure sensitive pen tablet area with 2 stylus buttons and no eraser
@johnp789
johnp789 / kamvas_strace.txt
Last active December 9, 2017 17:16
Gathering traces for Huion GT-191 under Linux
execve("/usr/bin/python3", ["python3", "./kamvas.py"], 0x7ffea8f34528 /* 16 vars */) = 0
brk(NULL) = 0x55e245a3c000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=527840, ...}) = 0
mmap(NULL, 527840, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f5d8a66c000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0]\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=145336, ...}) = 0
@johnp789
johnp789 / TEW-714TRU U-Boot environment.txt
Last active August 28, 2016 20:25
Trendnet TEW-714TRU factory image boot log
RT5350 # printenv
bootcmd=tftp
bootdelay=5
baudrate=57600
ethaddr="00:AA:BB:CC:DD:10"
ipaddr=10.10.10.123
serverip=10.10.10.3
ramargs=setenv bootargs root=/dev/ram rw
addip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(netdev):off
addmisc=setenv bootargs $(bootargs) console=ttyS0,$(baudrate) ethaddr=$(ethaddr) panic=1
@johnp789
johnp789 / Readme.txt
Last active August 29, 2015 14:13
comedi_data_read with pci-das6402/16
I've made a small modification to the tut2.c demo to have it call
comedi_data_read() three times for each range available on a pci-das6402/16 on
channel 0 and then again on channel 1. For the test, I've configured for about
0.4V to be applied on differential channel 0, and I've jumpered channel 1 so
that it has 0V on it.
I'm seeing three problems:
1) The first reading in each range looks erroneous. Is this an instance where
comedi_data_read_hint() should be called with a short settling time before
Script started on Fri 02 Jan 2015 05:16:31 PM CST
# comedi_calibrate -f /dev/comedi0 --reset --calibrate
Warning: device may not be not fully calibrated due to insufficient information.
Please file a bug report at https://bugs.comedi.org/ and attach this output.
This output will also allow comedi_calibrate to execute more
quickly in the future.
Forcing option: --verbose
Forcing options: --reset --dump --calibrate --results
Id
Driver name: cb_pcidas64
@johnp789
johnp789 / script-2014-02-02.txt
Last active August 29, 2015 13:55
OpenWRT Buildroot Log
Script started on Sun 02 Feb 2014 02:32:06 PM CST
ibjncursesrgcc/findutils/cdrkit2python2T_Buildroot?1034h[john@storm OpenWRT_Buildroot]$ sudo pacman -KS make git subversion wget unzip zl
[sudo] password for john:
warning: make-4.0-2 is up to date -- reinstalling
warning: git-1.8.5.3-1 is up to date -- reinstalling
warning: subversion-1.8.5-2 is up to date -- reinstalling
warning: wget-1.15-1 is up to date -- reinstalling
warning: unzip-6.0-6 is up to date -- reinstalling
warning: zlib-1.2.8-3 is up to date -- reinstalling
warning: ncurses-5.9-6 is up to date -- reinstalling
@johnp789
johnp789 / gist:8512045
Last active January 3, 2016 19:59
rsync write to F2FS hangs
$ uname -a
Linux storm 3.12.7-2-ARCH #1 SMP PREEMPT Sun Jan 12 13:09:09 CET 2014 x86_64 GNU/Linux
$ ps aux | grep rsync
root 1032 0.0 0.0 60324 3772 pts/0 D 16:23 0:00 rsync -aAX --info=progress2 /home/john/Documents/scratch/root/bin /home/john/Documents/scratch/root/boot /home/john/Documents/scratch/root/dev /home/john/Documents/scratch/root/etc /home/john/Documents/scratch/root/home /home/john/Documents/scratch/root/lib /home/john/Documents/scratch/root/mnt /home/john/Documents/scratch/root/opt /home/john/Documents/scratch/root/proc /home/john/Documents/scratch/root/root /home/john/Documents/scratch/root/run /home/john/Documents/scratch/root/sbin /home/john/Documents/scratch/root/srv /home/john/Documents/scratch/root/sys /home/john/Documents/scratch/root/tmp /home/john/Documents/scratch/root/usr /home/john/Documents/scratch/root/var .
root 1033 0.6 0.0 0 0 pts/0 Z 16:23 0:02 [rsync] <defunct>
john 1430 0.0 0.0 10668 1060 pts/0 S+ 16:29 0:00 grep rsync
@johnp789
johnp789 / arch_uvcvideo_fail.txt
Created December 30, 2013 21:10
Failure to load uvcvideo module
$ sudo modprobe uvcvideo
modprobe: ERROR: ctx=0x1248010 path=/lib/modules/3.12.6-1-ARCH/kernel/drivers/media/v4l2-core/videobuf2-vmalloc.ko.gz error=No such file or directory
modprobe: ERROR: ctx=0x1248010 path=/lib/modules/3.12.6-1-ARCH/kernel/drivers/media/v4l2-core/videobuf2-vmalloc.ko.gz error=No such file or directory
modprobe: ERROR: could not insert 'uvcvideo': Unknown symbol in module, or unknown parameter (see dmesg)
$ dmesg | tail
[ 4.124482] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver
[ 4.124483] NVRM: requires the use of a text-mode VGA console. Use of other console
[ 4.124484] NVRM: drivers including, but not limited to, vesafb, may result in
[ 4.124484] NVRM: corruption and stability problems, and is not supported.
[ 4.433600] systemd-journald[172]: File /var/log/journal/4a20a8f3d37f4149ac05d3ccefd43e1d/user-120.journal corrupted or uncleanly shut down, renaming and replacing.