Skip to content

Instantly share code, notes, and snippets.

View LastZactionHero's full-sized avatar

Zach LastZactionHero

View GitHub Profile
@LastZactionHero
LastZactionHero / cheatsheet.v
Last active January 30, 2024 15:11
Verilog Syntax Cheat Sheet
module module_name(signal_a, signal_b);
input [7:0] signal_a;
output signal_b;
endmodule
parameter n = 32;
integer k;
for (k = 0; k < n; k + 1)
begin
@LastZactionHero
LastZactionHero / technical_skills_list.txt
Created November 26, 2016 18:58
Technical Skills List
.NET
360-degree video
3D Animation
3D Design
3D Model Maker
3D Modelling
3D Printing
3D Rendering
3ds Max
4D
@LastZactionHero
LastZactionHero / buffered_uart.c
Created February 11, 2019 04:35
Buffered Uart TX
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
pthread_mutex_t tx_queue_lock;
typedef struct buffered_tx {
char *string;
int tx_posn;
@LastZactionHero
LastZactionHero / vivado_teardown.rb
Created January 23, 2019 18:40
Vivado VNC Server Teardown
# Saving some money!
# Snapshots the Vivado VNC server and terminates it with the Vultr API
#
# Configuration:
# ENV vultr_api_key
# Server Label: 'vivado'
require 'rest-client'
require 'json'
require 'pry'
@LastZactionHero
LastZactionHero / microblaze_uart.c
Created October 1, 2018 04:00
Microblaze UART
#include <xuartlite_l.h>
#include <xintc_l.h>
/* uartlite interrupt service routine */
void uart_int_handler(void *baseaddr_p) {
char c;
/* till uart FIFOs are empty */
while (!XUartLite_IsReceiveEmpty(XPAR_AXI_UARTLITE_0_BASEADDR)) {
/* read a character */
c = XUartLite_RecvByte(XPAR_AXI_UARTLITE_0_BASEADDR);
@LastZactionHero
LastZactionHero / convert.sh
Created August 1, 2018 21:01
ImageMagick Covert and Color
# Convert to smaller, monochrome
convert source.jpg -monochrome -resize 320x240 output.jpg
# Convert to gray samples
convert output.jpg gray:output.gray
# Convert back from monchrome samples to jpg (unnecessary)
convert -size 320x240 -depth 8 output.gray rebuild.jpg
# Convert monchrome JPG to RGB colorspace
convert rebuild.jpg -colorspace sRGB -type truecolor rebuild.jpg
@LastZactionHero
LastZactionHero / Boulder Tubing.md
Last active July 6, 2018 20:57
Boulder Tubing Assignment

Boulder Tubing Guide

During the summer, people go tubing down Boulder Creek. To be fun, it has to be just right: enough water flowing, hot enough, and mostly sunny.

Objective: Build an application that lets the user know if it's a good day to go tubing. Implement it however you'd like using. Preferably Ruby on Rails for the backend/API, but beyond that whatever stack you feel is appropriate.

The goal is to demonstrate general competency, and comfort developing an open-ended application. Take about an hour. Since that's not much time, it's fine to describe unfinished parts with what you'd have liked to do.

function crossed_boundary(current_posn, next_position, direction, segments)
function find_boundaries_crossed(z, segments, min, direction)
boundaries_crossed = 0
current_posn = min - 1.5 * DELTA
bool checking = true
while(checking)
next_posn = current_posn + 1
@LastZactionHero
LastZactionHero / gist:cd3ac6998a94a06c37ad
Last active March 9, 2018 08:33
My Fake Coffee Shop -or- Local Audience Twitter Favoriting

Today I made the decision to shut down King's Cross Coffee, the potentially-popular coffee shop that existed only in the hearts and minds of coffee-drinking Ann Arborites. I decided to shut it down because people were actually going there. It didn't seem fair, and I'd proved my point.

I'd been experimenting with the concept of automatically favoriting tweets from a local audience as a way of driving traffic. I set up a product called LocalFavorite which takes a search term and location range and favorites 3 tweets each hour.

The Experiment

Can a brand with no real-world presence build a legitimate following by Twitter favorites alone?

To control my variables, I created the Twitter account @KingsCrossCafe, a realistic-looking coffee shop in Ann Arbor, MI. I gave it a few photos, a real address, a bit.ly link, and posted a few tweets. Then I began automatically favoriting anyone in the Ann Arbor area that mentions 'coffee' or being 'tired'.

@LastZactionHero
LastZactionHero / blade_setup.sh
Last active March 4, 2018 17:23
Linux on Razer Blad
#!/bin/sh
case $1 in
post)
rmmod i2c_hid
modprobe i2c_hid
;;
esac