Welcome .
<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
def choose | |
puts "Do you like programming? Yes, no, or maybe please." | |
choice = gets.chomp | |
case choice.downcase | |
when "yes" | |
puts "That's great!" | |
when "no" | |
puts "That's too bad!" | |
when "maybe" | |
puts "Glad you are giving it a chance!" |
def fav_foods | |
food_array = [] | |
3.times do | |
puts "Name a favorite food" | |
food_array << gets.chomp | |
end | |
p food_array | |
puts "Your favorite foods are #{food_array.join(", ")}" | |
food_array.each do |food| # do something to each element in food_array; that element is to be referred to as food | |
puts "I like #{food} too!" # the thing we are doing |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Phil Jedar PortFolio</title> | |
<!-- CSS -- > | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> |
var $char_count = $("#char-count"); | |
$char_count.html(charCount); | |
if (charCount > 50) { | |
$char_count.css("color", "red"); | |
} | |
else { | |
$char_count.css("color", "#fff"); | |
} |
<head> | |
<title>Nameofapp</title> | |
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"> | |
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> | |
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> | |
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> |
require 'rest-client' | |
user_id = 5 | |
secret_key = 'secret key of user with id 5' | |
def calculate_canonical_string(content_type, content_md5, path, timestamp) | |
[ content_type, | |
content_md5, | |
path, | |
timestamp |
require 'rest-client' | |
user_id = 5 | |
secret_key = 'secret key of user with id 5' | |
tutor_id = 105 | |
timestamp = Time.now.utc.httpdate # Example: "Mon, 03 Aug 2015 20:15:56 GMT" | |
def calculate_canonical_string(content_type, content_md5, path, timestamp) |
curl "http://staging.bookandtable.com/mobile/1.0/sign_up?user_type=student&method=email" -v \ | |
--header "Accept: application/json" \ | |
--header "Content-Type: application/json" \ | |
--header "X-BOOK-AND-TABLE-API-KEY-TYPE: IOS" \ | |
--header "X-BOOK-AND-TABLE-API-KEY: 248f870f9a23b83625bb9c265c544924" \ | |
-d "{\"sign_up_data\":{\"email\":\"GRbookandtable201509211008@mailinator.com\",\"password\":\"12345678\",\"first_name\":\"Panos\",\"last_name\":\"Matsos\"}}" | |
Sample Response: |
input = gets.to_i |