Mark Vilrokx mvilrokx

View opendyslexic.css
1 2 3 4 5 6 7 8 9 10
@font-face {
font-family: 'opendyslexic';
src: url('http://dyslexicfonts.com/fonts/OpenDyslexic-Regular.otf');
font-style: normal;
font-weight: normal;
}
 
@font-face {
font-family: 'opendyslexic';
src: url('http://dyslexicfonts.com/fonts/OpenDyslexic-Italic.ttf');
View speechChange.js.coffee
1 2 3 4 5 6 7 8 9 10
# Function called when a speech recognition result is received.
speechChange = (e) ->
# Flow
# 1. pass received text to service that can interpret the text (using WolframAlpha right now)
# 2. when this service returns, show results of this service in the stream
e.preventDefault()
if e.type == 'webkitspeechchange' && e.originalEvent.results
topResult = e.originalEvent.results[0]
adjustStream(topResult.utterance)
# submit the form to the proxy service
View iris-home-view.html.haml
1 2 3 4 5 6
%ol#stream
%li.stream-item
What can I help you with?
#speech-form
=form_tag("/home/process_speech", :method => :get, :id=>"process_speech") do
%input#speech-button{:name => "utterance", :type => "text", "x-webkit-speech" => ""}
View iris-speech-button.css
1 2 3 4 5 6 7 8 9 10
#speech-button{
font-size: 250%;
border: none;
outline: none;
width: 42px;
cursor: pointer;
@include border-radius(10px);
text-indent: -9999px;
color: #fff;
}
View siriproxy-squeezebox.rb
1 2 3 4 5 6 7 8 9 10
class SiriProxy::Plugin::Squeezebox < SiriProxy::Plugin
def initialize(config)
@s = Squeezeboxer.new(config)
end
 
listen_for /radio on/i do
@s.power('1')
say "Radio is now turned on!"
request_completed
end
View squeezebox.rb
1 2 3 4 5 6 7 8 9 10
class Squeezebox
 
def initialize(config = {})
puts 'enter initialize in Squeezebox'
@t = Net::Telnet::new(
'Host' => config['host']||'localhost',
'Port' => config['port']||9090,
'Prompt' => /./ # needed to work
)
@id_set = false
View dabblet.css
1 2 3 4 5 6 7
/**
* Responsive Design
*/
 
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
View jquery-ui-datepicker-rails-part3.html.haml
1 2 3 4 5 6 7 8 9 10
# in your view (HAML + simple_form, simplified for easier reading)
= simple_form_for @bp_reading do |f|
= f.input :recorded_at, :as => :string, :input_html => { :class => 'jquery-ui-date', :value => @bp_reading.try(:recorded_at).try(:strftime,'%m/%d/%Y')}
= f.input :recorded_at, :as => :hidden, :input_html => { :id => 'recorded-at-alt'}
= f.button :submit, :disable_with => "Saving...", :value => "Save"
 
# in your javascript (coffeescript)
$ ->
$(".jquery-ui-date").datepicker(
altField: "#recorded-at-alt",
View jquery-ui-datepicker-rails-part2.html.haml
1 2 3 4 5 6 7 8 9 10
# in your view (HAML + simple_form, simplified for easier reading)
= simple_form_for @bp_reading do |f|
= f.input :recorded_at, :as => :string, :input_html => { :class => 'jquery-ui-date'}
= f.input :recorded_at, :as => :hidden, :input_html => { :id => 'recorded-at-alt'}
= f.button :submit, :disable_with => "Saving...", :value => "Save"
 
# in your javascript (coffeescript)
$ ->
$(".jquery-ui-date").datepicker(
altField: "#recorded-at-alt",
View jquery-ui-datepicker-rails-part1.html.haml
1 2 3 4 5 6 7 8 9 10
# in your application layout (using HAML)
= javascript_include_tag '//ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js'
= stylesheet_link_tag "//ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/smoothness/jquery-ui.css"
 
# in your view (HAML + simple_form, simplified for easier reading)
= simple_form_for @bp_reading do |f|
= f.input :recorded_at, :as => :string, :input_html => { :class => 'jquery-ui-date'}
= f.button :submit, :disable_with => "Saving...", :value => "Save"
 
# in your javascript (coffeescript)
Something went wrong with that request. Please try again.