{
"name": "assando-sites",
"require": {
"cakephp/cakephp": ">=2.5.0",
"ext-apcu": "*",
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 | |
// Cria um cookie chamado 'usuario' com o valor 'Fulano' | |
setcookie('usuario', 'Fulano'); | |
// Cria o mesmo cookie acima só que irá durar três dias | |
setcookie('usuario', 'Fulano', (time() + (3 * 24 * 3600))); | |
// Cria o novo cookie para durar duas horas | |
setcookie('nome', 'Ciclano', (time() + (2 * 3600))); |
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
# This file is copied to spec/ when you run 'rails generate rspec:install' | |
if ENV['coverage'] == 'on' | |
require 'simplecov' | |
SimpleCov.start 'rails' do | |
minimum_coverage 100 | |
end | |
end | |
ENV['RAILS_ENV'] ||= 'test' |
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 'active_support/concern' | |
module Lockable | |
@locked = false | |
def locked? | |
@locked == true | |
end | |
def lock! |
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' | |
class FakeModelWithPersistenceMethods | |
include Lockable | |
attr_accessor :locked | |
def lock! | |
@locked = true | |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
* [Features](#features) | |
* [Key Bindings](#key-bindings) | |
* [GFM Spesific Features](#gfm-spesific-features) | |
* [Commands for Command Palette](#commands-for-command-palette) | |
* [Installation](#installation) | |
* [Configuration](#configuration) | |
* [Tips](#tips) | |
* [Similar Plugins](#similar-plugins) | |
* [Contributing](#contributing) | |
* [Credits](#credits) |
Bundler::GemNotFound: Could not find jumpup-heroku-0.0.1.gem for installation
An error occurred while installing jumpup-heroku (0.0.1), and Bundler cannot continue.
Make sure that `gem install jumpup-heroku -v '0.0.1'` succeeds before bundling.
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
2.0.0p353 :001 > "2".to_i +2 | |
=> 0 | |
2.0.0p353 :002 > "2".to_i + 2 | |
=> 4 |
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
outdated_gems = `gem outdated` | |
regex = %r((?<gem>[\w-]+) \((?<old>[\d\.]+) < (?<new>[\d\.]+)\)) | |
gemfile = File.read("./Gemfile") | |
outdated_gems.each_line do |line| | |
data = line.match(regex) | |
gemfile.gsub!(%r(gem '#{data[:gem]}',(\s+)'[^']+'), "gem '#{data[:gem]}',\\1'#{data[:new]}'") | |
end |