Skip to content

Instantly share code, notes, and snippets.

View ashgti's full-sized avatar

John Harrison ashgti

View GitHub Profile
@ashgti
ashgti / Error Msgs
Created March 17, 2012 02:49
Rustc build failure
Stack dump:
0. Running pass 'Function Pass Manager' on module 'core.rc'.
1. Running pass 'Greedy Register Allocator' on function '@_ZN7unicode16derived_property10Alphabetic17_fa1eb4cef144b687E'
/bin/sh: line 1: 78747 Illegal instruction: 4 x86_64-apple-darwin/stage1/bin/rustc -O --target=x86_64-apple-darwin --enforce-mut-vars -o x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libcore.dylib src/libcore/core.rc
make: *** [x86_64-apple-darwin/stage1/lib/rustc/x86_64-apple-darwin/lib/libcore.dylib] Error 132
$ avrdude -p at90usb82 -F -P usb -c avrispmkii -U flash:w:UNO-dfu_and_usbserial_combined.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0xffffff
avrdude: Yikes! Invalid device signature.
iface foo<A> {
fn bar(a: A, b: A);
}
impl of foo<int> for int {
fn bar(a: int) {
// bad.
}
}
@ashgti
ashgti / Simple Repeater
Created January 28, 2012 20:04
A simple arduino setup to test a xbee
#include <SoftwareSerial.h>
SoftwareSerial xbee(2,3);
void setup() {
Serial.begin(9600);
xbee.begin(9600);
}
void loop() {
97.548% in __select()
01.442% in read()
#include <string>
#include <iostream>
using std::string;
using std::cout;
using std::endl;
void foo(string &foo) {
foo += "hello";
}
diff -r a37008dd3341 ogre_tools_qt/CMakeLists.txt
--- a/ogre_tools_qt/CMakeLists.txt Thu Dec 15 17:29:28 2011 -0800
+++ b/ogre_tools_qt/CMakeLists.txt Fri Dec 16 00:55:18 2011 -0600
@@ -40,12 +40,6 @@
set(X11_LIBS ${X11_LIBRARIES})
endif(UNIX AND NOT APPLE)
-if(APPLE)
- include_directories(/usr/X11/include)
- link_directories(/usr/X11/lib)
#include <cstdio>
int main() {
int a[10] = {0,1,2,3,4,5,6,7,8,9};
int i = 3;
printf("%d %d\n", (a[4]), 4[a]); // => 4 4
printf("%d %d\n", (a[i]), i[a]); // => 3 3
}
from matplotlib import pyplot
from matplotlib.patches import Circle
from shapely.geometry import Polygon, LineString
from descartes.patch import PolygonPatch
import math
import numpy as np
COLOR = {
True: '#6699cc',
False: '#ff3333'
∫ export
declare -x Apple_PubSub_Socket_Render="/tmp/launch-d0dBqo/Render"
declare -x CLICOLOR="yes"
declare -x COMMAND_MODE="unix2003"
declare -x CPLUS_INCLUDE_PATH="/usr/local/include:"
declare -x DISPLAY="/tmp/launch-BId4X7/org.x:0"
declare -x EDITOR="vim"
declare -x FTP_PASSIVE="1"
declare -x GL_ENABLE_DEBUG_ATTACH="YES"
declare -x HISTCONTROL="erasedups:ignoreboth"