Install HomeBrew first
brew update
brew tap caskroom/cask
brew install brew-cask
If you get the error "already installed", follow the instructions to unlink it, then install again:
Install HomeBrew first
brew update
brew tap caskroom/cask
brew install brew-cask
If you get the error "already installed", follow the instructions to unlink it, then install again:
// | |
// TransitionManager.swift | |
// Start | |
// | |
// Created by Plan B on 12/1/14. | |
// Copyright (c) 2014 Plan B. All rights reserved. | |
// | |
import UIKit |
// iOS5 Only | |
- (void) setMediaInfo { | |
NSMutableDictionary * dict = [[NSMutableDictionary alloc] init]; | |
NSString * imName = @"imagetest.png"; // Artwork image | |
[dict setObject:NSLocalizedString(@"My Music", @"") forKey:MPMediaItemPropertyTitle]; | |
[dict setObject:NSLocalizedString(@"Myself Artist", @"") forKey:MPMediaItemPropertyArtist]; | |
MPMediaItemArtwork * mArt = [[MPMediaItemArtwork alloc] initWithImage:[UIImage imageNamed:imName]]; | |
[dict setObject:mArt forKey:MPMediaItemPropertyArtwork]; | |
[MPNowPlayingInfoCenter defaultCenter].nowPlayingInfo = nil; | |
[[MPNowPlayingInfoCenter defaultCenter] setNowPlayingInfo:dict]; |
#Problema com SSL no Rails | |
- Fazer download do arquivo e salvar no Desktop | |
https://gist.github.com/fnichol/867550/raw/win_fetch_cacerts.rb | |
- Abra o Prompt e digite cole codigo abaixo | |
ruby "%USERPROFILE%\Desktop\win_fetch_cacerts.rb" | |
- Acesse Variaveis de Ambiente que fica no painel de controle/avançado e clique em novo e insira as informações abaixo e clique em ok apos terminar | |
Variavel: SSL_CERT_FILE |
function preload(arrayOfImages) { | |
$(arrayOfImages).each(function(){ | |
$('<img/>')[0].src = this; | |
// Alternatively you could use: | |
// (new Image()).src = this; | |
}); | |
} | |
// Usage: |
# Artsy Editorial | |
# | |
# Get Page stats from google analytics | |
GA = require('googleanalytics') | |
util = require('util') | |
require('date-utils'); | |
module.exports = (robot) -> | |
robot.hear /stats (.*)http:\/\/artsy.net\/(.*)/i, (msg) -> |
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |