start new:
tmux
start new with session name:
tmux new -s myname
| require 'rubygems' | |
| require 'google_spreadsheet' | |
| session = GoogleSpreadsheet.login("jangtugowski@gmail.com", "kakadada") | |
| spreadsheet = session.spreadsheet_by_key("0AlG-njvmBdlJdENlMzlVR3hTYUo1ZGhnck1NSm0yT3c") | |
| ws = spreadsheet.worksheets[0] | |
| ws[1, 1] = "Cześć" | |
| ws[1, 2] = "Czołgiem" | |
| ws.save |
| class ActionDispatch::Routing::Mapper | |
| def draw(routes_name) | |
| instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
| end | |
| end | |
| BCX::Application.routes.draw do | |
| draw :api | |
| draw :account | |
| draw :session |
| require 'base64' | |
| require 'cgi' | |
| def show_session(cookie) | |
| Marshal.load(Base64.decode64(CGI.unescape(cookie.split("\n").join).split('--').first)) | |
| end |
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |
| # THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | |
| # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |
| # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
| require 'tracer' | |
| Tracer.add_filter do |event, file, line, id, binding, klass, *rest| |
| /** | |
| * Example of using an angular provider to build an api service. | |
| * @author Jeremy Elbourn (@jelbourn) | |
| */ | |
| /** Namespace for the application. */ | |
| var app = {}; | |
| /******************************************************************************/ |
| /*global angular: true, google: true, _ : true */ | |
| 'use strict'; | |
| angular.module('geocoder', ['ngStorage']).factory('Geocoder', function ($localStorage, $q, $timeout) { | |
| var locations = $localStorage.locations ? JSON.parse($localStorage.locations) : {}; | |
| var queue = []; | |
| // Amount of time (in milliseconds) to pause between each trip to the |
#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">
| Spree::CheckoutController.class_eval do | |
| def ensure_checkout_allowed | |
| check = @order.checkout_allowed? | |
| unless check == true | |
| redirect_to spree.cart_path, :flash => {:error => I18n.t("checkout_allowed_errors.#{check}")} | |
| end | |
| end | |
| end |
| App.Router.map(function() { | |
| this.resource('post', { path: '/posts/:post_id' }); | |
| }); | |
| App.PostRoute = Ember.Route.extend({ | |
| model: function(params) { | |
| return this.store.find('post', params.post_id); | |
| } | |
| }); |