Skip to content

Instantly share code, notes, and snippets.

View lolaodelola's full-sized avatar

Lola lolaodelola

View GitHub Profile
@lolaodelola
lolaodelola / element-name.css
Last active April 5, 2016 10:39
CSS Class Names
.logo{
padding: 5px 10px;
display: inline-block;
background-color: #111111;
}
.sub-heading{
font-size: 16px;
text-align: center;
padding: 5px 10px;
.padding-5-10{
padding: 5px 10px;
}
.inline-block{
display: inline-block;
}
.border-red{
border: 1px red solid;
@lolaodelola
lolaodelola / wet_tests_spec.rb
Created April 13, 2016 08:55
An example of wet tests
feature 'Viewing links' do
scenario 'user views links' do
when_a_user_visits_the_homepage
then_they_should_see_links
end
def when_a_user_visits_the_homepage
create :link, title: 'first'
visit root_path
@lolaodelola
lolaodelola / webphone_script_2.js
Last active October 20, 2020 11:10
step2 of script.js webphone
/* global Peer */
/**
* Gets the local audio stream of the current caller
* @param callbacks - an object to set the success/error behaviour
* @returns {void}
*/
@lolaodelola
lolaodelola / webphone_server.js
Last active October 20, 2020 11:11
server file for webphoneserver file for web phone
const express = require("express");
const http = require('http');
const path = require('path');
const app = express();
const server = http.createServer(app);
const { ExpressPeerServer } = require('peer');
const port = process.env.PORT || "8000";
const peerServer = ExpressPeerServer(server, {
proxied: true,
@lolaodelola
lolaodelola / webphone_package.json
Last active October 20, 2020 11:11
package.json for webphone
{
"name": "audio_app",
"version": "1.0.0",
"description": "An audio app using WebRTC",
"main": "server.js",
"scripts": {
"start": "node server.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
def results
tags = params[:tags][:ids].reject!(&:empty?)
@mentors = Mentor.joins(:tags).where(tags: { id: tags }).distinct
end
TWILIO_SID = <YOUR TWILIO SID>
TWILIO_TOKEN = <YOUR TWILIO TOKEN>
TWILIO_NUMBER = <YOUR TWILIO PHONE NUMBER>
validates_presence_of :phone_number
scope :confirmed, -> { where(confirmed: true) }
it 'creates a uuid before create' do
d = Developer.create!(phone_number: '0984737424')
expect(d.uuid).to_not be_nil
end