Skip to content

Instantly share code, notes, and snippets.

Stephen Hunter Arcolye

Block or report user

Report or block Arcolye

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# Selecting a photo to upload shows photo and filename instantly
placeSelectedPhotoPreview = (input) ->
if input.files && input.files[0]
reader = new FileReader()
reader.onload = (e) ->
# When a photo is selected
Arcolye / gengo_translation_api_wrapper.rb
Last active Jan 26, 2017
GoToStudy - Gengo Translation API wrapper
View gengo_translation_api_wrapper.rb
# Gengo provides an API to their human translation service
class GengoTranslation
require 'gengo'
attr_accessor :gengo
def initialize(sandbox: false)
sandbox = true unless Rails.env.production?
Arcolye / spec-features-agency_office_spec.rb
Last active Jan 26, 2017
GoToStudy - Agency Office Spec
View spec-features-agency_office_spec.rb
require 'spec_helper'
feature "AgencyOffice" do
let(:agency) { create(:agency) }
scenario "makes agency visible on relevant country page" do
visit country_path(
expect(page).to have_content
Arcolye / app-views-lessons-show.html.erb
Last active Jan 26, 2017
A Ruby on Rails view. Bootstrap is used semantically, with Bootstrap classes included only in the .scss
View app-views-lessons-show.html.erb
<%= pgtitle @lesson %>
<%= description @lesson.meta_description.presence || @lesson.description.presence %>
<div class="lesson">
<%= section class: "lesson-header" do %>
<div class="lesson-icon-wrapper">
<div class="lesson-icon">
<%= image_tag @lesson.icon %>
Arcolye / gist:407371a24d3c27a33045
Created Apr 28, 2015
Morse Code Generator for Sonic Pi
View gist:407371a24d3c27a33045
message = 'Morse code is old'
words_per_minute = 18 # slow:12, standard: 18, fast: 24
@u = 1.2 / words_per_minute #One time unit (length of 1 dot)
@looped = true #comment out to play message only once
@pitch = 83
You can’t perform that action at this time.