Skip to content

Instantly share code, notes, and snippets.

@bigthyme
bigthyme / Header.html
Created August 8, 2012 17:27
Bootstrap Intro
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>My First Webpage</title>
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="resources/css/webpage.css"/>
<!--For Mobile Users-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
@bigthyme
bigthyme / webpage.css
Created August 8, 2012 18:25
CSS for Bootstrap Example
html, body {
height: 100%;
background-color: #d8d8d8;
}
.top_bar {
height: 2.1em;
font-size: 1.5em;
min-width: 100%;
background-color:#dbdbdb;
@bigthyme
bigthyme / webpage.html
Created August 8, 2012 18:33
HTML code for bootstrap example
<body>
<!--fluid attribute gives the div the ability to be responsive for mobile
devices-->
<div class="row-fluid" style="min-width: 100%;">
<!--span12 makes the css class full screen no matter how big or small
the device is-->
<div class="span12 top_bar">
<h3>Goodbye World!</h3>
</div>
<div class="span12 main_container">
@bigthyme
bigthyme / gist:3739413
Created September 17, 2012 19:57
Require Instructions
require 'rubygems'
require 'twilio-ruby'
@bigthyme
bigthyme / gist:3739422
Created September 17, 2012 19:58
Initial setup instructions
account_sid = "ACXXXXXXXXXXXXXXXXXX" #enter your Twilio account information
auth_token = "XXXXXXXXXXXXXXXXXX"
client = Twilio::REST::Client.new account_sid, auth_token
@bigthyme
bigthyme / gist:3739442
Created September 17, 2012 20:02
Code for Twilio
begin
client.account.sms.message.create({
:from => "+1##########", #enter your Twilio numbers here
:to => '+1##########',
:body => "Hey there Good Lookin!"
})
rescue Exception => e
#Console log just to confirm your SMS went through
puts "Message successfully sent!"
end
@bigthyme
bigthyme / jstwitter.rb
Created November 24, 2012 23:36
Easily Integrate with Twitter API (testing purposes only)
#require dependent libs
require "jumpstart_auth"
class JSTwitter
attr_reader :client
def initialize
puts "Initializing..."
@client = JumpstartAuth.twitter
end
#[1]Require dependent libs
require "jumpstart_auth"
#[2]Adds Class name for scope purposes
class JSTwitter
#[3]Grabs the client attribute from jumpstart library.
attr_reader :client
def initialize
puts "Initializing..."
#We are using a twitter API method here: http://tutorials.jumpstartlab.com/topics/environment/environment.html
def tweet(message)
#[5]if logic that will check if the user's message is equal to 140. If the message is shorter,
#then it'll tell the user how many characters were used out of 140. If not, it will throw an
#error message.
if message.length >= 140
puts "People are yawning, please shorten your message"
def run
puts "Welcome to the Command Line Twitter Client"
command = ""
#[6]use cases, if a user types button "x" do something, if a user types button "y" do something.
while command != "q"
printf "enter command: "
input = gets.chomp
parts = input.split
command = parts[0]
case command