Skip to content

Instantly share code, notes, and snippets.

View ZachMassia's full-sized avatar

Zach Massia ZachMassia

  • MacEwen Petroleum Inc.
  • Ontario, Canada
View GitHub Profile
@ZachMassia
ZachMassia / platforio-setup.org
Created October 23, 2016 01:29
C++ / PlatformIO setup using use-package

Add irony-mode and platformio-mode to c/c++ mode.

(use-package irony
  :ensure t
  :commands (irony-mode))

(use-package irony-eldoc
  :ensure t
  :commands (irony-eldoc))
@ZachMassia
ZachMassia / error
Created June 13, 2015 16:40
Rust E0191
~/D/R/firmata git:master ❯❯❯ cargo build
Compiling firmata v0.1.0 (file:///Users/zach/Development/Rust/firmata)
src/lib.rs:9:15: 9:25 error: the value of the associated type `Settings` (from the trait `serial::SerialPort`) must be specified [E0191]
src/lib.rs:9 port: &'a SerialPort,
^~~~~~~~~~
error: aborting due to previous error
Could not compile `firmata`.
To learn more, run the command again with --verbose.
using System;
using System.Collections.Generic;
namespace ECS
{
public sealed class Entity
{
// A unique ID representing the Entity. Will not be reused if
// the entity is deleted.
public long UniqueID { get; internal set; }
Traceback (most recent call last):
File "/home/zach/dev/python/scripting/lab2/part1.py", line 161, in <module>
app.run()
File "/home/zach/dev/python/scripting/lab2/basic_game/app.py", line 41, in run
self.game.update(self.clock.get_time())
File "/home/zach/dev/python/scripting/lab2/part1.py", line 36, in update
[m.update(dt) for m in self.marios.values()]
File "/home/zach/dev/python/scripting/lab2/part1.py", line 36, in <listcomp>
[m.update(dt) for m in self.marios.values()]
TypeError: Argument must be a dict with rectstyle keys.
lab2/
basic_game/
app.py (App)
event.py (EventManager)
part1.py (Game)
for app.py to see the EventManager class, the from .event import EventManager was needed.
%% Erlang Version
universal_server() ->
receive
{become, F} ->
F()
end.
// An alternative to this method is to use a small hierarchy of
// nodes with the camera being attached to the deepest child node.
// With this alternative method, you would not have to manually place
// and rotate your spotlight. It also avoids gimbal lock.
//
// Here is where I got most of the code for my FPS setup for lab 4:
// http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Creating+a+simple+first-person+camera+system
void yourUpdateFunc()
{
#include "XboxController.h"
XboxController::XboxController(PAD_ID pad) :
id(pad)
{
}
XboxController::~XboxController()
{
func (b *Board) run() {
for {
msg := message{}
header, err := b.buf.ReadByte() // Line 123 in my full file.
if err != nil {
log.Printf("Error reading message header: %s", err)
return
}
// Sysex commands have their own header so check for that first.
@ZachMassia
ZachMassia / gist:6198354
Created August 10, 2013 00:13
mx-git build output
➜ mx-git makepkg -si
==> Making package: mx-git 1.99.4_271_g6a43d10-1 (Fri Aug 9 20:09:33 EDT 2013)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating mx git repo...
Fetching origin
==> Validating source files with md5sums...
mx ... Skipped
==> Extracting sources...