Skip to content

Instantly share code, notes, and snippets.

@geraldstanje
geraldstanje / gist:c0782002c1f959aacec8
Created August 4, 2015 14:38
go 1.5 cross compilation
https://medium.com/@rakyll/go-1-5-cross-compilation-488092ba44ec
@geraldstanje
geraldstanje / gist:196225f2aef2bb0ca329
Created August 4, 2015 08:54
great llvm overview
http://adriansampson.net/blog/llvm.html
@geraldstanje
geraldstanje / gist:be44836c2e0f1800c193
Created July 26, 2015 14:27
golang json decode example
package main
import (
"bytes"
"encoding/json"
"fmt"
"log"
"time"
)
https://serversforhackers.com/video/process-monitoring-with-upstart
http://www.jeffreybolle.com/blog/create-a-web-app-using-google-go
@geraldstanje
geraldstanje / gist:1e28b4ef1f10a0157c86
Created July 16, 2015 21:02
golang interfaces example
package main
import "fmt"
type Frobber interface {
Frob() int
}
type FrobOne int
type FrobTwo int
https://daringfireball.net/projects/markdown/syntax#p
@geraldstanje
geraldstanje / info
Created June 27, 2015 13:46
Error report, target.json and c compiler version
Error:
------------------------------------------------------------------------------------------------------------------------
$ make clean; make
rm -f *.o libcompiler-rt.a sys/*.o blinky.elf blinky.hex blinky.bin
arm-xilinx-eabi-ar rcs libcompiler-rt.a sys/boot.S
rustc --target target.json -A non_camel_case_types -A dead_code -A non_snake_case main.rs -C link-args="-Tsys/lscript.ld -mcpu=cortex-a9" -L. -o blinky.elf -Z print-link-args
main.rs:5:12: 5:20 warning: unused or unknown feature, #[warn(unused_features)] on by default
main.rs:5 #![feature(int_uint)] // update fail_bounds_check
^~~~~~~~
main.rs:10:5: 10:24 warning: unused import, #[warn(unused_imports)] on by default
# Binaries will be generated with this name (.elf, .bin, .hex, etc)
PROJ_NAME=blinky
# Put your stlink folder here so make burn will work.
#STFLASH=st-flash
RUSTC=rustc
#LLC=llc-3.6
AS=arm-xilinx-eabi-as
CC=arm-xilinx-eabi-gcc
interesting paper:
http://octarineparrot.com/assets/mrfloya-thesis-ba.pdf
#!/bin/bash
# your code goes here
a=1;
b=2;
a=$((a+b));
b=$((a-b));
a=$((a-b));