This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the last question in the DB for this user | |
$this->ResetValues(); | |
$this->SetValue('user_id', $user_id); | |
$last_question = current($this->GetAssoc('question_id', 'question_id', 'DESC', 0, 1)); | |
// Start the API connection | |
$connection = new FormspringOAuth(CONSUMER_KEY, CONSUMER_SECRET, | |
$myUser->GetValue('oauth_token'), $myUser->GetValue('oauth_token_secret')); | |
// Grab new items in the inbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Redirect | |
header("HTTP/1.1 301 Moved Permanently"); | |
header('Location: ' . $results['url']); | |
die(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe "Tasks" do | |
before do | |
@task = Task.create :task => 'go to bed' | |
end | |
describe "GET /tasks" do | |
it "display some tasks" do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loops: | |
<ul> | |
<% for task in @tasks %> | |
<li id="task_<%= task.id %>"><%= task.task %> | |
| <%= link_to 'Edit', edit_task_path(task) %> | |
| <%= link_to 'Delete', task, :method => 'delete' %> | |
</li> | |
<% end %> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
books.values.each { |rate| ratings[rate] += 1 } | |
class BlogEntry | |
def initialize( title, mood, fulltext ) | |
@time = Time.now | |
@title, @mood, @fulltext = title, mood, fulltext | |
end | |
end | |
--------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://learn.github.com/p/branching.html | |
https://github.com/Kunena/Kunena-2.0/wiki/Create-a-new-branch-with-git-and-manage-branches | |
Renaming a heroku app | |
$ heroku apps:rename newname --app oldname | |
http://newname.heroku.com/ | [email protected]:newname.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media all { | |
body { | |
background-color: #fff; | |
color: #000; | |
font-family: Arial,Helvetica,sans-serif; | |
font-size: 100%; | |
margin: 0; | |
padding: 0; | |
} | |
a { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="wsu-header"> | |
<div class="c"> | |
<ul class="skip"> | |
<li><a href="#content">Skip to Content</a></li> | |
<li><a href="#menu">Skip to Navigation</a></li> | |
</ul> | |
<h1><a href="http://wayne.edu/"><img src="//wayne.edu/global/images/wsu-wayne-state-university.gif" alt="Wayne State University" width="344" height="33" /></a></h1> | |
<h2><a href="http://wayne.edu/aimhigher/"><img src="//wayne.edu/global/images/wsu-aim-higher.gif" alt="Aim Higher" width="85" height="13" /></a></h2> | |
<div id="tab"> | |
<ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Menu button | |
http://codepen.io/chriscoyier/pen/fzsqm | |
Change menu borders | |
.nav-bar li, .nav-bar li a, .nav-bar > li:last-child { | |
border: none; | |
box-shadow: none; | |
} |
OlderNewer