Skip to content

Instantly share code, notes, and snippets.

View hak8or's full-sized avatar

hak8or hak8or

View GitHub Profile
@hak8or
hak8or / timeline.txt
Created January 14, 2015 23:46
PCB timeline
Payment received for order #ZS5q8Z04. Sun, Oct 26, 2014 at 8:10 PM
Order #ZS5q8Z04 assigned to panel Sun, Oct 26, 2014 at 10:19 PM
Order #ZS5q8Z04 sent to fab. Mon, Nov 3, 2014 at 4:00 PM
Payment received for order #ZmQPLkO0 Tue, Nov 4, 2014 at 5:42 PM
Order #ZmQPLkO0 assigned to panel. Wed, Nov 5, 2014 at 4:16 PM
Order #ZmQPLkO0 sent to fab. Wed, Nov 5, 2014 at 4:33 PM
Payment received for order #cQJQCxj3 Wed, Nov 5, 2014 at 6:59 PM
Order #cQJQCxj3 assigned to panel. Wed, Nov 5, 2014 at 11:35 PM
@hak8or
hak8or / page-counter.html
Created January 19, 2015 09:59
content decorating in polymer using JS.
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/core-icons/core-icons.html">
<link rel="import" href="../bower_components/paper-fab/paper-fab.html">
<!-- Allow not having to include even links in the future -->
<polymer-element name="page-counter" attributes="page total_pages">
<template>
<style>
:host {
font-size: 1.2rem;
@hak8or
hak8or / Sketch_1.pde
Created February 19, 2015 07:51
Week 2
// Run once to setup the scene and program
void setup(){
// Make a view of 800 by 600 pixels. Should
// be made into a global val of sorts.
size(800,600);
// Enable AA
smooth();
}
@hak8or
hak8or / Makefile
Created March 13, 2015 03:56
Makefile for one of my projects
CC=g++
CFLAGS=-c -std=c++0x
LDFLAGS=
SOURCES=main.cpp tests.cpp graph.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=findNames
all: $(SOURCES) $(EXECUTABLE)
optimize: CFLAGS += -O3 -march=native -flto -fwhole-program
@hak8or
hak8or / test.cpp
Created March 14, 2015 22:35
asdasda
void find_none_zeroed_memory(unsigned char volatile * const base, unsigned char volatile * const top){
unsigned char volatile *offset = base;
dbg_info("Looking for modified memory. \n");
while (offset < top) {
// Do some magic because this and my desktops endian'ness are opposits.
volatile char num[4] = {*offset, *(offset + 1), *(offset + 2), *(offset + 3)};
long output = num[3] | num[2] << 8 | num[1] << 16 | num[0] << 24;
@hak8or
hak8or / gist:20523bdd94d181fcd90f
Last active August 29, 2015 14:17
U-BOOT WORKS!!!! :D :D :D :D This means I finally got code execution working from DRAM! :D DRAM clk only at 100 Mhz instead of 133 Mhz but ah well.
Contents at 0x2005d8ec : 0xffffffff
Contents at 0x2005d8f0 : 0xffffffff
Contents at 0x2005d8f4 : 0xffffffff
Contents at 0x2005d8f8 : 0xffffffff
Contents at 0x2005d8fc : 0xffffffff
Jumping to JUMP_ADDR (0x20008400) ...
U-Boot 2014.07-00058-gb44bde2-dirty (Mar 15 2015 - 01:53:35)
@hak8or
hak8or / gist:f3020533f92ea99462ce
Created March 15, 2015 23:24
U-Boot sees my flash drive after USB jack swap!
Contents at 0x2005d8f8 : 0xffffffff
Contents at 0x2005d8fc : 0xffffffff
Jumping to JUMP_ADDR (0x20008400) ...
U-Boot 2014.07-00058-gb44bde2-dirty (Mar 15 2015 - 01:53:35)
CPU: AT91SAM9N12
Crystal frequency: 16 MHz
CPU clock : 301.333 MHz
@hak8or
hak8or / gist:82ff1d70cad6385b9085
Last active March 9, 2023 09:19
Linux Kernel Boot without rootfs
U-Boot> usb tree
USB device tree:
1 Hub (12 Mb/s, 0mA)
| U-Boot Root Hub
|
+-2 Mass Storage (12 Mb/s, 100mA)
OCZ DIESEL 50E69116000688
U-Boot> usb storage
Device 0: Vendor: OCZ Rev: PMAP Prod: DIESEL
@hak8or
hak8or / gist:20662f37d8acfa62115b
Created March 16, 2015 05:04
Automated kernel boot from USB
▒RomBOOT
==============================
Using Dataflash!
ba_offset = 0xb ...
AT91Bootstrap 3.7.1-00054-gef803bb-dirty (Sun Mar 15 19:00:41 PDT 2015)
Edited by hak8or!
@hak8or
hak8or / gist:17539df300ba1189e2a0
Created March 16, 2015 11:29
Kernel TTY muckup somewhere
==============================
Using Dataflash!
ba_offset = 0xb ...
AT91Bootstrap 3.7.1-00054-gef803bb-dirty (Sun Mar 15 19:00:41 PDT 2015)
Edited by hak8or!
Yey custom code execution and toolchain verification! :D
======--======--======--======
MASTER_CLOCK (MCLK): 0x5f5e100
SPI clock rate requested: 0xa1220