Skip to content

Instantly share code, notes, and snippets.

View rigred's full-sized avatar

Rigo rigred

View GitHub Profile
@rigred
rigred / zen_mce
Last active August 7, 2017 18:06
Ryzen MCE Logs
Jun 15 11:08:54 jupiter kernel: mce: [Hardware Error]: Machine check events logged
Jun 15 11:08:54 jupiter kernel: mce: [Hardware Error]: CPU 2: Machine Check: 0 Bank 2: bea0200000020136
Jun 15 11:08:54 jupiter kernel: mce: [Hardware Error]: TSC 0 ADDR 20b6f20 MISC d012000101000000 SYND f0c71d443792 IPID 200b000000000
Jun 15 11:08:54 jupiter kernel: mce: [Hardware Error]: PROCESSOR 2:800f11 TIME 1497521328 SOCKET 0 APIC 2 microcode 8001126
Jun 15 13:23:57 jupiter kernel: mce: [Hardware Error]: Machine check events logged
Jun 15 13:23:57 jupiter kernel: mce: [Hardware Error]: CPU 12: Machine Check: 0 Bank 5: bea0000000000108
Jun 15 13:23:57 jupiter kernel: mce: [Hardware Error]: TSC 0 ADDR 8016 MISC d012000101000000 SYND 4d000000 IPID 500b000000000
Jun 15 13:23:57 jupiter kernel: mce: [Hardware Error]: PROCESSOR 2:800f11 TIME 1497529432 SOCKET 0 APIC c microcode 8001126
@rigred
rigred / fizzbuzz_tiny.asm
Created August 2, 2017 19:58
A very small fizzbuzz program written in IA-32 assembly
; fizzbuzz_tiny.asm
BITS 32
org 0x08048000
ehdr: ; Elf32_Ehdr
db 0x7F, "ELF", 1, 1, 1, 0 ; e_ident
times 8 db 0
dw 2 ; e_type
dw 3 ; e_machine
dd 1 ; e_version
@rigred
rigred / touch-swipe.js
Created June 16, 2017 15:09
old touch swipe jquery plugin
/**
Usage:
$("#element").touchwipe({
wipeLeft: function() { alert("left"); },
wipeRight: function() { alert("right"); },
wipeUp: function() { alert("up"); },
wipeDown: function() { alert("down"); },
min_move_x: 20,
min_move_y: 20,
@rigred
rigred / swipe.js
Created June 16, 2017 14:50
native js swipe
var touchstartX = 0;
var touchstartY = 0;
var touchendX = 0;
var touchendY = 0;
var gesuredZone = document.getElementById('gesuredZone');
gesuredZone.addEventListener('touchstart', function(event) {
touchstartX = event.changedTouches[0].screenX;
@rigred
rigred / easy-secure-iptables
Last active June 28, 2023 01:12
A Simple script to lock down your ubuntu/other server using iptables firewall. This script makes use of outbound rules so be sure to configure any services you need access to. Also setup your preferred ssh port.
#!/bin/bash
IPT="/sbin/iptables"
# Server IP
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')"
# Your DNS servers you use: cat /etc/resolv.conf
DNS_SERVER="8.8.8.8 8.8.4.4 208.67.222.222 208.67.220.220"
# Allow connections to this package servers
@rigred
rigred / Seagate ST2000DL001 F3 commands
Created May 27, 2017 15:50
Dump of the F3 commands for the ST2000DL001 Seagate Drive CC97 FW
Rst 0x20M
(P) SATA Reset
ASCII Diag mode
F3 T>
ASCII Diag mode
F3 T>/C
@rigred
rigred / amd-trademarks.md
Last active May 14, 2017 16:07
List of AMD trademarks filed with the USPTO