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 UsersController do | |
describe "User creation" do | |
it "should create a new user" do | |
@user = mock_model(User, | |
:email => 'test@gmail.com', | |
:password => 'test', | |
:name => 'tester', |
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
req = Net::HTTP::Post.new('/api/1.0/messages/send.json', initheader = {'Content-Type' =>'application/json'}) | |
req.body = @request.to_json | |
http = Net::HTTP.new(@uri.host, @uri.port) | |
http.use_ssl = true | |
response = http.start {|http| http.request(req) } | |
puts "Response #{response.code} #{response.message}: #{response.body}" | |
# => Response 500 Internal Server Error: {"status":"error","code":-100,"name":"GeneralError","message":"An unknown error occurred processing your request. Please try again later."} |
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
<?php | |
$con = mysql_connect("web02.sjc.netdna.com", "devel", "n3tdn@"); | |
if (!$con) die('Could not connect: ' . mysql_error()); | |
mysql_select_db("clients_test", $con); | |
// MUST Consider 100TB packages |
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 "net/http" | |
require "uri" | |
require "json" | |
module Postman | |
class MandrilAPI | |
@key = '' | |
@request = {} | |
@uri = '' |
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
window.init_scrollbars = (pane, scrollbar) -> | |
content = pane.find(".conversation-scroll-content") | |
if pane.height() > content.height() | |
scrollbar.css("opacity", "0.3") | |
else | |
scrollbar.draggable({ | |
containment: "parent", | |
axis: 'y', | |
drag: (event, ui) -> | |
scrollbar_height = scrollbar.parent().height() - scrollbar.height() |
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
window.init_scrollbars = (pane, scrollbar) -> | |
content = pane.find(".conversation-scroll-content") | |
if pane.height() > content.height() | |
scrollbar.css("opacity", "0.3") | |
else | |
scrollbar_height = scrollbar.parent().height() - scrollbar.height() | |
scrollbar.draggable({ | |
containment: "parent", | |
axis: 'y', | |
drag: (event, ui) -> |
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 Group | |
include Ripple::Document | |
include Ripple::Encryption | |
property :name, String, :presence => true | |
property :user_id, String, :presence => true, :index => true | |
timestamps! | |
one :owner, class_name: 'User', foreign_key: :user_id |
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
#### SDD | |
* Dual-Core I7 | |
* 8GB RAM | |
Finished in 4 minutes 57.1 seconds | |
542 examples, 0 failures | |
#### HDD (5400) |
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 Player | |
@health = 20 | |
@bottom = false | |
@pivot = false | |
@last_mode = nil | |
@last_move = nil | |
@mode = :walk | |
@move = :backward | |
@fullrecover = false | |
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
irb(main):001:0> Application.find("mapmyfitness") | |
=> <Application:mapmyfitness flags={} has_icon=false created_at=2012-11-12 23:09:35 UTC app_type="browser" app_status="dev" scope_permissions="public" default_access_type="read_write" connected_apps=0 total_users=5 state="inactive" name="mapmyfitness" prod_activated_at=nil display_name="mapmyfitness" description="MapMyFitness Connector" url_website=nil url_support="http://mhealth.dev.attcompute.com" consumer_id="T43czemeRxRRoHHEQOau" consumer_secret="FW2m75YgHkuR2wnwwI8VpDKYDnJK63dns6yKRyAg" updated_at=2013-09-12 19:30:03 UTC developer_id=nil organization=nil compliance=nil url_subscription=nil url_callback=nil> |