Skip to content

Instantly share code, notes, and snippets.

View peteonrails's full-sized avatar

Peter Jackson peteonrails

View GitHub Profile
@peteonrails
peteonrails / ic7300.rules
Created April 2, 2016 00:21
UDEV file for ICOM IC-7300
SUBSYSTEM!="tty",GOTO="hamlib_end"
# Bus 004 Device 026: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", TEST!="/dev/ic7300", SYMLINK+="ic7300", MODE="666"
LABEL="hamlib_end"
@peteonrails
peteonrails / lsusb.txt
Created February 17, 2016 14:15
Troubleshoot FT-991 USB interface
~] lsusb -v 9:14:04
Bus 004 Device 010: ID 0b05:179c ASUSTek Computer, Inc.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 224 Wireless
bDeviceSubClass 1 Radio Frequency
@peteonrails
peteonrails / README.md
Created January 4, 2019 14:40 — forked from jondkinney/README.md
jondkinney's console vim setup

Console VIM and Tmux setup compatible with Mac OS X and Linux.

Installation

Install by running the following command in your terminal:

exec 3<&1;bash <&3 <(curl https://gist.githubusercontent.com/jondkinney/2040114/raw/vim.sh 2> /dev/null)
@peteonrails
peteonrails / database_truncator.rb
Created January 24, 2019 15:16
Database Truncation
# frozen-string-literal: true
class DatabaseTruncator
def self.truncate
skipped = 'schema_migrations'
ActiveRecord::Base.establish_connection
ActiveRecord::Base.connection.tables.each do |table|
puts "Truncating #{table}"
ActiveRecord::Base.connection.execute("TRUNCATE #{table} CASCADE") unless skipped.include?(table) # rubocop:disable Metrics/LineLength
@peteonrails
peteonrails / Overview
Last active February 11, 2017 22:30
ASUS z270 Motherboard with Intel onboard controller Fix EEPROM Checksum for e1000 Linux Driver
The ASUS z270 motherboard ships with a bug in the firmware that prevents the Linux kernel driver (e1000)
from activating the hardware. The system will boot correctly, but will not activate your network interface
with this error in place.
In order to fix the issue, I followed these steps:
1. Download the latest Intel Linux drivers from https://downloadcenter.intel.com/product/19297/Intel-82573L-Gigabit-Ethernet-Controller
2. Transfer the drivers to the z270 machine with a thumbdrive
3. Patch the linux drivers to ignore the checksum error. See diff below.
4. make, make install the patched driver. Please note, this will taint your kernel We can fix that later.
@peteonrails
peteonrails / Copyright correction
Created April 8, 2016 08:43
HAMLIB IC-7300 Rig Driver (patches submitted to upstream)
@peteonrails
peteonrails / lsusb | diff
Created April 2, 2016 00:14
Icom IC7300 USB device names
< Bus 004 Device 029: ID 08bb:2901 Texas Instruments PCM2901 Audio Codec
< Bus 004 Device 028: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
< Bus 004 Device 027: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub
@peteonrails
peteonrails / 20-chromebook-pixel.conf
Last active February 8, 2016 13:57
Config file for building the kernel in Arch linux mainline AUR
# /etc/X11/xorg.conf.d/20-chromebook-pixel.conf
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
@peteonrails
peteonrails / startx.output
Created June 11, 2013 21:45
Output of startx after installing to chroot, then installing gnome-shell
pete@localhost:~$ startx
xauth: (stdin):2: unknown command "<snip>"
X.Org X Server 1.13.3
Release Date: 2013-03-07
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.2.0-37-generic x86_64 Ubuntu
Current Operating System: Linux localhost 3.4.0 #1 SMP Fri May 17 15:04:08 PDT 2013 x86_64
Kernel command line: cros_secure console= loglevel=7 init=/sbin/init cros_secure oops=panic panic=-1 root=/dev/dm-0 rootwait ro dm_verity.error_behavior=3 dm_verity.max_bios=-1 dm_verity.dev_wait=1 dm="1 vroot none ro 1,0 2097152 verity payload=2dd1bb63-06e2-c24a-8518-32163f764b5d+1 hashtree=2dd1bb63-06e2-c24a-8518-32163f764b5d+1 hashstart=2097152 alg=sha1 root_hexdigest=409a3fc5fa7198433cfdd21377b640f61429f171 salt=de27d4324dc3f5550adf5ce1a2b1960295d8a25989fb3e6ec050b4cbe2912a06" noinitrd vt.global_cursor_default=0 kern_guid=2dd1bb63-06e2-c24a-8518-32163f764b5d add_efi_memmap boot=local noresume noswap i915.modeset=1 tpm_tis.force=1 tpm_tis.interrupts=0 nmi_watchdog=panic,lapic gpt
# Contributor: Mikolaj Pastuszko <deluminathor@gmail.com>
# Contributor: Andrej Gelenberg <andrej.gelenberg@udo.edu>
# Contributor: Peter Jackson <pete@peteonrails.com>
license=('GPL' 'custom:Brother')
arch=('i686' 'x86_64')
pkgname=brscan3
pkgver=0.2.11_5
pkgrel=1
pkgdesc="SANE drivers from Brother for brscan3 compatibile models"
depends=('sane' 'sed')