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 class="container"> | |
<div id="login"> | |
<%= simple_form_for("user", :url => user_session_path) do |f| %> | |
<div class="login"> | |
<%= f.input :email, :autofocus => true, :required => false %> | |
<%= f.input :password, :required => false %> | |
</div><!-- login --> | |
<div class="reset"> |
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
<% @tickets.each do |ticket| %> | |
works as expected | |
<%= ticket.id %> | |
<%= time_ago_in_words(ticket.created_at) %> | |
returns a hash | |
<%= @tickets.count %> |
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
class Gameprofile | |
include HTTParty | |
base_uri "http://192.168.0.20:7001/management/" | |
attr_accessor :authToken | |
def initialise(authToken) | |
self.authToken = authToken | |
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
options = [ | |
{"ActionScript"=>"orange"}, | |
{"AppleScript"=>"orange"}, | |
{"Asp"=>"red"}, | |
{"BASIC"=>"green"}, | |
{"C"=>"blue"}, | |
{"C++"=>"purple"}, | |
{"Clojure"=>"green"}, | |
{"COBOL"=>"red"}, | |
{"ColdFusion"=>"red"}, |
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
[{"ActionScript":"orange","AppleScript":"orange","Asp":"red","BASIC":"green","C":"blue","C++":"purple","Clojure":"green","COBOL":"red","ColdFusion":"red","Erlang":"green","Fortran":"orange","Groovy":"green","Haskell":"green","Java":"green","JavaScript":"brown","Lisp":"purple","Perl":"blue","PHP":"red","Python":"green","Ruby":"green","Scala":"green","Scheme":"orange"}] |
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
<% | |
(@messages.count == 0 ? Array.new(5).map { Message.new } : @messages.each).each do |m| | |
%> |
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
class Message < ActiveRecord::Base | |
belongs_to :ticket, :primary_key => "token", :foreign_key => "token" | |
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
+-----------------------------------------------------+ | |
| <----------------------+ Head | |
| Layout.php +-------------------------------+ | | |
| | Menu 1 <-----------+ Include each block separately | |
| +-----------+ +-------------------------------+ | | |
| | | | Menu 2 <-----------+ Wrap your includes with layout divs | |
| | Sidebar | +-------------------------------+ | | |
| | | | | |
| | | +-------------------------------+ | |
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
/Users/jlebrech/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:219:in `block in replace_bin_path': can't find executable rake (Gem::Exception) | |
from /Users/jlebrech/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/bin/rake:19:in `<main>' |
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 'imgkit' | |
kit = IMGKit.new('http://google.com', :quality => 94, :width => 320, :height => 240) | |
img = kit.to_img(:jpeg) | |
file = kit.to_file('file.jpg') | |
#the output file has the dimensions of 710x240 | |
#clearly not right. |