Christopher Woodall cwoodall
- Somerville, MA
- Sign in to view email
- cwoodall.com
View block_example.rb
## This file is not meant to run, just portray what Blocks do | |
## RUBY Example | |
names = ['Chris', 'Joe', 'Jeff', 'Tom'] | |
names.each do |name| | |
puts name | |
end | |
# OUTPUT: | |
# Chris | |
# Joe |
View gist:847651
function watts = dBm2watts( dBm ) | |
watts = 10^-3*10.^(dBm/10); | |
endfunction | |
function [loss_min loss_max] = loss_per_meter( meters ) | |
loss_min = meters*.19; | |
loss_max = meters*.43; | |
endfunction | |
function [loss_min loss_max] = loss_per_bulkhead( bulkheads ) |
View blockTest.m
// | |
// blockTest.m | |
// blocksTest | |
// | |
// Created by Christopher Woodall on 6/14/11. | |
// Copyright 2011 Christopher Woodall. | |
// MIT License | |
// | |
#import <Foundation/Foundation.h> |
View give_hugs.rb
# This program makes people happy | |
# | |
# Author:: Christopher Woodall <chris.j.woodall at gmail.com> | |
# Copyright:: Copyright (c) July 2011 Christopher Woodall | |
# License:: MIT License | |
# A human being | |
class Person | |
attr_reader :name, :status, :description |
View columns.css
/** | |
* @author Christopher J. Woodall | |
* @date Aug 21, 2011 | |
* @license MIT License | |
* | |
* @class column | |
* @description for column based content in a class-wise fashion, useful for specifying design changes on the ly or in js | |
* | |
* | |
* @use class="float" will inherit, but class = "float right" will float to the right |
View center.css
.center { | |
display:block; | |
} | |
.center.horizontal { margin-left: auto; margin-right: auto; } | |
.center.vertical { top:50%; margin-top:100%; } | |
View blank.rb
# Evaluate whether the Object is nil or empty. Makes sure it gets evaluated regardless of empty or nil. | |
# | |
# Author:: Christopher J. Woodall (mailto:chris.j.woodall@gmail.com) | |
# Copyright:: Copyright (c) 2011 Christopher J. Woodall | |
# License:: All Rights Reserverd | |
# add blank? method to Object | |
class Object | |
# Checks for nil? and empty? at once... If one fails move to the other. | |
def blank? |
View run_proc.rb
# Author :: Christopher Woodall <chris.j.woodall@gmail.com> | |
# Copyright :: 2011 Christopher Woodall | |
# License :: MIT License | |
require 'pty' | |
# run_proc(proc) runs a psuedoterminal version of a command returning output to a block | |
# asynchronously as it is produced. | |
def run_proc(proc) | |
# Spawn the PTY process |
View comparator.v
// Behavioral 3-bit Comparator | |
module comparator_3bit_behavioral(A, B, GT, LT, EQ); | |
input signed [2:0] A; | |
input signed [2:0] B; | |
output GT, LT, EQ; | |
wire signed [2:0] A, B; | |
reg GT, LT, EQ; | |
always @ (A, B) begin |
View generate_verilog_lut.py
import math | |
import random | |
def generateSineTable(max_dac_val=63.0, steps_per_cycle=256): | |
sine_lut = []; | |
for r in range(0, steps_per_cycle): | |
sine_lut.append((max_dac_val/2) * (math.sin(r*2*math.pi/steps_per_cycle) + 1)) | |
return sine_lut | |
def generateTriangleWave(max_dac_val=63.0, steps_per_cycle=256): |
OlderNewer