Skip to content

Instantly share code, notes, and snippets.

Zach Massia ZachMassia

  • Ontario, Canada
View GitHub Profile
@ZachMassia
ZachMassia / platforio-setup.org
Created Oct 23, 2016
C++ / PlatformIO setup using use-package
View platforio-setup.org

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))
View error
~/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.
View entity.cs
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; }
View error
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.
View layout
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.
View serv.erl
%% Erlang Version
universal_server() ->
receive
{become, F} ->
F()
end.
View src.cpp
// 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()
{
View XboxController.cpp
#include "XboxController.h"
XboxController::XboxController(PAD_ID pad) :
id(pad)
{
}
XboxController::~XboxController()
{
View code.go
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 Aug 10, 2013
mx-git build output
View gist:6198354
➜ 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...
You can’t perform that action at this time.