Skip to content

Instantly share code, notes, and snippets.

View deanmarano's full-sized avatar
🦏

Dean Marano deanmarano

🦏
View GitHub Profile
#!/usr/bin/env bash
sudo kill -9 `ps ax|grep 'coreaudio[a-z]' |awk '{print $1}'`

Keybase proof

I hereby claim:

  • I am deanmarano on github.
  • I am deanmarano (https://keybase.io/deanmarano) on keybase.
  • I have a public key whose fingerprint is 1ED8 25AD 5F29 01AF F6EE 85D4 4ACB A2B4 5335 A703

To claim this, I am signing this object:

@deanmarano
deanmarano / turry.md
Created July 15, 2016 18:54
The story of Turry

A 15-person startup company called Robotica has the stated mission of “Developing innovative Artificial Intelligence tools that allow humans to live more and work less.” They have several existing products already on the market and a handful more in development. They’re most excited about a seed project named Turry. Turry is a simple AI system that uses an arm-like appendage to write a handwritten note on a small card.

The team at Robotica thinks Turry could be their biggest product yet. The plan is to perfect Turry’s writing mechanics by getting her to practice the same test note over and over again:

“We love our customers. ~Robotica”

Once Turry gets great at handwriting, she can be sold to companies who want to send marketing mail to homes and who know the mail has a far higher chance of being opened and read if the address, return address, and internal letter appear to be written by a human.

@deanmarano
deanmarano / tested-jekyll.md
Last active July 22, 2023 17:26
Tested Jekyll

Testing Your Jekyll Site, The Ruby Way

Here at eSpark Learning, we use Jekyll to host our marketing site, https://www.esparklearning.com. Within eSpark Engineering, we love automated testing - most of our codebases require a passing test suite for all changes. As we add more javascript to our Jekyll site, we wanted to add a test framework that would give us real world tests - testing that the HTML was valid was no longer enough.

Acceptance Testing with RSpec, Capybara, and Selenium

To create real world acceptance tests for our site, we used a few technologies we were familiar with:

  • RSpec - Behaviour Driven Development for Ruby
  • Capybara - Test web applications by simulating how a real user would interact with your app
  • Selenium - Selenium automates browsers

Farewell, App Store - The Web Strikes Back

Native apps became hugely popular for many good reasons - but many of those reasons are no longer valid. Performance, offline capabilities, push notifications, background workers, installation abilities, databases, and more have fundamentally changed browsers - and it's time to start using them. Together, we'll explore the current pros and cons of native versus web apps and take a deep dive into real world offline web app. By breaking down it's internals, we'll give an idea of what the web offers today and see just how awesome a truly offline web app can be.

@deanmarano
deanmarano / promises.coffee
Created February 22, 2016 21:12
Promise Support for Jasmine
itPromises = (testName, testFn) ->
it testName, (done) ->
promise = testFn()
if typeof promise.then == 'function'
promise.then(done, ->
fail("Promise was rejected - #{JSON.stringify(arguments)}")
)
else
fail('specs with itPromises needs to return a promise')
done()

Veggies

  • 2 jalapeno peppers
  • 4 cloves garlic
  • 1 tablespoon ginger
  • 2 onions
  • 1 medium tomato
  • 1/2 pounds carrots, peeled and sliced

Fruits

  • 1/4 cup lime juice
@deanmarano
deanmarano / tips.md
Last active January 13, 2016 17:49
Development Tips

General

(bullets need expanding or categorization)

  • Class names should not be verbs, nor should they be verbs turned into nouns. (ex Enroller, UserAuthenticator)
  • Don't be clever. Clever is not obvious, and harder to read. Always code for the reader.
  • Reading code is hard. Writing code is easy. Get better at reading code.
  • Wrap third party calls (anything over the network) in their own wrapper. Don't make network calls outside of wrapper classes.
  • The rule of proximity - declare variables, methods, imports, etc. as close as possible to where they are used. (exception - standards of grouping imports near the top, etc.)
  • Push conditionals to the edges - out (to your public API) and in (towards the APIs you use), away from the middle.
  • If you’re writing a web service, play with the idea of making new endpoints instead of conditionals as query params
class UserEnroller
attr_reader :user, :email
def initialize(user)
@user = user
if @user
# do some initialization, set some variables
end
end