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
def publish | |
require 'parse-ruby-client' | |
Parse.init :application_id => "App_ID", :api_key => "App_Key" | |
@magazine = Magazine.find(params[:magazine_id]) | |
@issue = Issue.find(params[:id]) | |
# Checking to see whether we have a magazine already. Making a new one if we don't and grabbing the old one if we do. | |
current_magazine = Parse::Query.new("Magazine").value_in("title", [@magazine.title]).get | |
magazine = nil | |
if current_magazine.length == 0 |
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
//Setting up objectmapping for issue | |
RKObjectMapping *issueMapping = [RKObjectMapping mappingForClass:[Issue class]]; | |
[issueMapping addAttributeMappingsFromDictionary:@{ | |
@"title": @"title", | |
@"description": @"description", | |
@"cover_url": @"cover_url", | |
@"published_at": @"published_at", | |
@"issue_number": @"issue_number" | |
}]; | |
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
{ "issue" : { "articles" : [ { "article_image_url" : "https://uninkd.s3.amazonaws.com/uploads/tiger.jpg", | |
"main_text" : "<p>Remember <a href=\"http://37signals.com/svn/posts/3329\">when I said we hired Chris</a> after advertising for a GMT position a few months ago? That was a bit of a fib. We were actually blown away bytwo applications during that go-round and decided to hire both of the candidates we liked. Natalie Keshlear joins us from the venerable community team at <a href=\"http://soundcloud.com/\">SoundCloud</a>. She’ll be working with us from Berlin, Germany.Natalie is originally from Southern California, but moved to Berlin about 2 years ago to work for SoundCloud. She loves it there, but decided she couldn’t pass up an opportunity to stay in a place she loved and work with we <a href=\"http://smiley.37signals.com/\">happy-makers</a>. While we were originally looking for only one more European support team member, we decided to treat Chris and Natalie like Pokémon and caught ‘em all.If y |
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 'open-uri' | |
require 'json' | |
BASE_URL = "http://letsrevolutionizetesting.com/challenge.json" | |
@counter = 0 | |
def follow_the_rabbit(url) | |
json = JSON.parse(open(url).read) | |
puts " " |
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
{ | |
"products": [ | |
{ | |
"title": "SENNEPFARVEDE CHINOS, VAN GILS", | |
"brand": "VAN GILS", | |
"price": "799,00 DKK", | |
"description": "Cool Mustard Chinos fra Van Gils. En kombination med disse fløjls chinos kan gøre selv det mest hverdagsagtige Outfit spændende. Normal pasform. Wear it always with pride and a smile. Farve: Sennepfarvet Kvalitet: Yderstof: 97% Bomuld 3% Elastan Foer: 65% Polyester 35% Bomuld", | |
"pictures":[ | |
"http://marthoni.dk/images/van-gils-bukser-og-leggings-sennepfarvede-chinos-van-gils-CLYFLAND.jpg", | |
"http://marthoni.dk/files/product_images/11264/van-gils-bukser-og-leggings-sennepfarvede-chinos-van-gils-CLYFLAND-1.jpg", |
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
# -*- coding: utf-8 -*- | |
$:.unshift("/Library/RubyMotion/lib") | |
require 'motion/project/template/osx' | |
begin | |
require 'bundler' | |
Bundler.require | |
rescue LoadError | |
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
➜ 2048_Free git:(master) ✗ rake config | |
================================================================================ | |
A new version of RubyMotion is available. Run `sudo motion update' to upgrade. | |
================================================================================ | |
bubble-wrap/camera requires iOS to use. | |
bubble-wrap/ui requires iOS to use. | |
build_dir : "./build" | |
category : "utilities" | |
codesign_certificate : "Mac Developer: holger sindbæk (553BRGV25S)" |
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
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> | |
<meta content="IE=9" http-equiv="x-ua-compatible"> | |
<meta content="695275890"> | |
<meta content="http://www.hif.se/imgs/hif_emblem.png"> | |
<title>HELSINGBORGS IF - www.hif.se</title><!--[if IE 8]> | |
<link href="css/ie8.css" rel="stylesheet" type="text/css" /> | |
<![endif]--> | |
<link href="css/formatStylesheet.css" media="all" rel="stylesheet" type= | |
"text/css"> |
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
/* Start General Class */ | |
body { | |
color: #909090; | |
} | |
body.boxed-layout .page { | |
background-color: #ffffff; | |
} | |
a { | |
color: #909090; | |
} |
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
var $button = $("<div id='source-button' class='btn btn-primary btn-xs'>< ></div>").click(function() { | |
var html = $(this).parent().html(); | |
html = cleanSource(html); | |
$("#source-modal pre").text(html); | |
$("#source-modal").modal(); | |
}); | |
$('[data-toggle="popover"]').popover(); | |
$('[data-toggle="tooltip"]').tooltip(); |
OlderNewer