A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
pub struct DrawService { | |
display: Rc<Display>, | |
frame: Frame, | |
program: Program, | |
perspective: PerspectiveMatrix3<f32>, | |
} | |
impl DrawService { | |
fn build_perspective(frame: &Frame) -> PerspectiveMatrix3<f32> { | |
let (width, height) = frame.get_dimensions(); |
src/engine.rs:34:3: 38:4 error: match arms have incompatible types [E0308] | |
src/engine.rs:34 match result { | |
^ | |
src/engine.rs:34:3: 38:4 help: run `rustc --explain E0308` to see a detailed explanation | |
src/engine.rs:34:3: 38:4 note: expected type `_` | |
src/engine.rs:34:3: 38:4 note: found type `()` | |
src/engine.rs:35:44: 35:75 note: match arm with an incompatible type | |
src/engine.rs:35 UpdateResult::ChangeState(new_state) => { self.swap_state(new_state); }, | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
fn draw(&self, display: &GlutinFacade) -> () { | |
let mut target = display.draw(); | |
target.clear_color_and_depth((0.0, 0.0, 0.0, 1.0), 1.0); | |
let uniforms = uniform! { | |
model: [ | |
[0.01, 0.0, 0.0, 0.0], | |
[0.0, 0.01, 0.0, 0.0], | |
[0.0, 0.0, 0.01, 0.0], | |
[0.0, 0.0, 1.0, 1.0f32], |
pub struct StatePlaying<'world> { | |
chunk: Chunk<'world>, | |
camera: SimpleCamera<f32>, | |
program: &'world Program, | |
} | |
impl <'world> StatePlaying<'world> { | |
pub fn new(display: &GlutinFacade, program: &'world Program) -> StatePlaying<'world> { | |
StatePlaying { | |
chunk: Chunk { blocks: [[[█ CHUNK_SIZE]; CHUNK_SIZE]; CHUNK_SIZE] }, |
/* | |
* Returns the GPIO offset address | |
* | |
* ret: the GPIO offset address | |
*/ | |
.globl GetGPIOAddress | |
GetGPIOAddress: | |
ldr r0, =0x3F200000 | |
mov pc, lr |
#!/bin/sh | |
# If you have OS X and have UglifyJS installed, this uglifies Marginalize and | |
# puts the `javascript:` URL into the clipbord. Hoorah! | |
uglifyjs -c -m -o marginalize.min.js marginalize.js | |
printf 'javascript:' | cat - marginalize.min.js | pbcopy |
local component = require("component") | |
local computer = require("computer") | |
local event = require("event") | |
local fs = require("filesystem") | |
local process = require("process") | |
local shell = require("shell") | |
local term = require("term") | |
local text = require("text") | |
local unicode = require("unicode") |
-------------- | |
-- JSON Lib -- | |
-------------- | |
-- JSON4Lua: JSON encoding / decoding support for the Lua language. | |
-- json Module. | |
-- Author: Craig Mason-Jones | |
-- Homepage: http://json.luaforge.net/ | |
-- Version: 0.9.40 | |
-- This module is released under the MIT License (MIT). |
#!/bin/bash | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then echo "\ | |
appify v3.0.1 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |