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\index.html
Last active November 22, 2021 19:47
Web Phone index.htmlweb phone index.html file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Lola's Web Phone!</title>
<meta property="og:title" content="Teleprompter!">
@lolaodelola
lolaodelola / webphone\index.css
Last active February 2, 2021 16:39
web phone index css
*, *:before, *:after {
box-sizing: border-box;
}
body {
color: darkslategrey;
display: flex;
align-items: center;
justify-content: center;
background: antiquewhite;
@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": [],
@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_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}
*/
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>