Skip to content

Instantly share code, notes, and snippets.

@angiebui
angiebui / example_twilio_business_metrics.rb
Last active January 17, 2017 18:47
Example: Twilio Business Metrics to Analytics Server
{
:total_inbound_calls => 274,
:cx_total_inbound_calls => 191,
:spec_ops_total_inbound_calls => 79,
:total_inbound_calls_canceled => 30,
:cx_total_inbound_calls_canceled => 25,
:spec_ops_total_inbound_calls_canceled => 4,
:average_speed_for_call_answer => 15,
:cx_average_speed_for_call_answer => 17,
:spec_ops_average_speed_for_call_answer => 12,

Continuous Integration for Fun and Profit

Continu-what?

Definition: the practice of frequently integrating one's new or changed code with the existing code repository -Wikipedia

Merging new code into master often sounds awesome, but we've been learning the value of testing and the importance of a passing test suite.

But, as your projects grow, your test suite should grow as well. We're all lazy and forget to run the entire test suite everytime we create a new commit. For large projects, running the entire test suite can take hours. So we do what all lazy people do, make a computer to the work for us.

Methods:

  • expect
  • .to change { }.by()
describe "#add_task" do 
  it 'only adds a single task' do
    task = Task.new("Feed the cows")
    list = List.new("Stuff")
 
@angiebui
angiebui / zoo.js
Last active December 16, 2015 22:19 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
function Animal(name, numLegs){
this.name = name,
this.numLegs = numLegs
}
Animal.prototype = {
identify: function(){
@angiebui
angiebui / index.html
Last active December 16, 2015 22:08 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
$(document).ready(function () {
$("form").on('submit', function(e){
e.preventDefault();
$.ajax({
url: $(this).attr('action'),
method: $(this).attr('method'),
}).done(function(response) {
@angiebui
angiebui / blog.html
Created March 30, 2013 23:04
Railsbridge fake blog
<!DOCTYPE html>
<html>
<head>
<title>Angie's Code &#9728;</title>
<style type="text/css">
body{
font-family: arial;
font-size: 14px;
margin: 0;
}