Skip to content

Instantly share code, notes, and snippets.

@kerrickstaley
kerrickstaley / parse_serato_crates.py
Created March 22, 2019 17:02
Functions for parsing Serato DJ crates
import struct
def decode_struct(data):
ret = []
i = 0
while i < len(data):
tag = data[i:i+4].decode('ascii')
length = struct.unpack('>I', data[i+4:i+8])[0]
value = data[i+8:i+8+length]
value = decode(value, tag=tag)
@kerrickstaley
kerrickstaley / gist:9c16dcac4d7cde5313c3ce46c81da2ba
Created December 25, 2017 07:04
ip a output when tethering on phone
2: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether d4:25:8b:e8:b7:d7 brd ff:ff:ff:ff:ff:ff
inet 192.168.43.80/24 brd 192.168.43.255 scope global dynamic noprefixroute wlp2s0
valid_lft 3554sec preferred_lft 3554sec
inet6 2600:1014:b10c:39ba:cec7:c529:f589:2812/64 scope global dynamic noprefixroute
valid_lft 3556sec preferred_lft 3556sec
inet6 fe80::2617:ffec:acbc:34bf/64 scope link noprefixroute
valid_lft forever preferred_lft forever
@kerrickstaley
kerrickstaley / gist:b1fe713144f8506cdf7ab4b6bbf10baf
Last active December 25, 2017 07:04
ip a output when connected to home router
2: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether d4:25:8b:e8:b7:d7 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.105/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp2s0
valid_lft 86397sec preferred_lft 86397sec
inet6 fe80::1227:998d:5939:e90f/64 scope link noprefixroute
valid_lft forever preferred_lft forever
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Laptop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
CPU Family: 0x6
@kerrickstaley
kerrickstaley / system_info.txt
Created August 15, 2017 07:42
Kerrick's Steam system info 2017-08-15
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Laptop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
CPU Family: 0x6
@kerrickstaley
kerrickstaley / binding_onClick.js
Created September 18, 2016 20:39
Binding onClick to this in react.js
class Canvas extends Component {
constructor(props) {
super(props);
var onClick;
if (this.props.onClick) {
onClick = this.props.onClick.bind(this);
}
this.state = {
@kerrickstaley
kerrickstaley / system_information
Created September 21, 2013 02:42
System information from Steam
Processor Information:
Vendor: GenuineIntel
CPU Family: 0x6
CPU Model: 0x2a
CPU Stepping: 0x7
CPU Type: 0x0
Speed: 3100 Mhz
8 logical processors
4 physical processors
HyperThreading: Supported
@kerrickstaley
kerrickstaley / Crash dump
Last active December 21, 2015 02:59
Info for TF2 crash To use the crash dump, click the "View Raw" icon at the top right, copy the text, then run xclip -selection clipboard -o | base64 -d | gunzip > crash_dump in a terminal.
H4sIADp5DFIAA+xbC1hV1baee4O4t4BsxRTRI9srJaYp2ov0lPgmRCMfhH2l+CjNB5JCIiiyl3IOx0zR0tCsyOwLzZJ8FJna7miF5gPTup7yXlGyg+9le+vG57rjn3PNzRLZ1vnuvaf6dH7fYM4xxj/HHGvM55prM6D3gMSX32WsIWPMzkSaPC1okF5kfkQb/Bkro5wytvxhxspnmFk9Kq80MaZ28WMBVC4mKrzPj9WnPIYo9n4/qju238GWjNke8KO6Y/t1I2NVg/yo7th+wwgTlYS6opyfhLpj+50OJgyVLVQuIfnBMX7MSuW58SaW/4wfawCbJI+21qMyY662jFka1GPNIWvE6k6qQ+N5ImO55PguM+VJjHX2hU9xu3luoyrDBD7xOca6+MIXvOCSePtEgbfPYOxeX/jcCz9LvJoj8Op8xh7xha8Y8aPEOxcKvPMtxrr7xHcSeDu5tlLgC7ZTn/iMz4JKaT/lK4FP+U/GevjC2y4elfjo7wU++gRjPX37f1T6w04LPAs2sV4+8Z8dkfjyEBPHl3cysd4+8RFefFEXgS8aZGJ9fOJnVUh82lCBT8swsb4+8YcPS3xspsDHFppYP5/jIdbbX7bXBN72nok96nO8xf1D4iveF/iKLSbW3xe+JPKAxJc4Bb6k3MQSfOGLmnjxufsFPrfSxAb4HJ+rv5L4xJ8EPvGCiQ306f+y7RJvvyjwdquZPeYznpO3SrwaaBbjv4WZJfrCl4/w4p2tBN7Z0cwe94V3PubFF3QW+IIeZjbIZzy7e/EpvQU+ZYiZDfYZz05efPQTAh891syG+I7PFoln4wWeZZl9gG+nP1o6cM6hXRg4wiP5de/EHKe90sIZ/9/MLa8vTIy839wXpo7wxLocWm8i+xWHFs1GeAJJDBnU0eU9joMkZuS7Mcdz/yn4usxBx5/vN34ub1/XSsn0jMN0wvOyA9P5847W9e11MmIKLzk0Xi+IsU6kuxZf4ArW8UMfT/K0oTzAbGLAoW75hbpjczvdTv+O
@kerrickstaley
kerrickstaley / gist:6097540
Created July 28, 2013 05:40
Recent pacman.log contents
[2013-07-27 16:01] [PACMAN] Running 'pacman -Syu'
[2013-07-27 16:01] [PACMAN] synchronizing package lists
[2013-07-27 16:01] [PACMAN] starting full system upgrade
[2013-07-27 16:01] [PACMAN] upgraded a52dec (0.7.4-6 -> 0.7.4-7)
[2013-07-27 16:01] [PACMAN] upgraded anki (2.0.11-1 -> 2.0.12-1)
[2013-07-27 16:01] [PACMAN] upgraded bison (2.7.1-1 -> 3.0-1)
[2013-07-27 16:01] [PACMAN] upgraded python2-dateutil (2.1-6 -> 2.1-7)
[2013-07-27 16:01] [PACMAN] upgraded python2-dnspython (1.10.0-1 -> 1.11.0-1)
[2013-07-27 16:01] [PACMAN] upgraded calibre (0.9.40-1 -> 0.9.41-1)
[2013-07-27 16:01] [PACMAN] upgraded clutter-gst (2.0.4-2 -> 2.0.6-1)
@kerrickstaley
kerrickstaley / steam_stderr_stdout
Last active December 12, 2015 06:29
Information related to "Anomaly: Warzone Earth" failing to install
########################################################################
######################## Steam stderr/stdout #########################
##### Note: In this session, I "installed" Anomaly and attempted #####
############################# to run it. #############################
########################################################################
Running Steam on arch rolling 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(1360108773_client)
Installing breakpad exception handler for appid(steam)/version(1360108773_client)