Under Terminal > Preferences... > (Profile) > Advanced, "Declare terminal as:" should be set to xterm-256color
.
This is easy with homebrew:
brew install screen
require 'capybara' | |
require 'sauce/job' | |
require 'sauce/capybara' | |
module Spinach | |
class Scenario | |
def fail! | |
@failed = true | |
end | |
def failed? |
Under Terminal > Preferences... > (Profile) > Advanced, "Declare terminal as:" should be set to xterm-256color
.
This is easy with homebrew:
brew install screen
# Example from: http://snipplr.com/view/37063/ | |
include Rails.application.routes.url_helpers | |
# set host in default_url_options: | |
default_url_options[:host] = "localhost" | |
# can then use: | |
url_for() |
require 'openssl' | |
require 'Base64' | |
key = "secret-key" | |
data = "some data to be signed" | |
Base64.encode64(OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new('sha256'), key, data)).strip() |
module HashConverter | |
class << self | |
def to_underscore hash | |
convert hash, :underscore | |
end | |
def to_camel_case hash | |
convert hash, :camelize, :lower | |
end | |
def convert obj, *method | |
case obj |
In Tools | Options | Keyboard...
CTRL+W
as a Global shortcut for Window.CloseDocumentWindow
CTRL+W
shortcut for Edit.SelectCurrentWord
The caveat to this is if you are used to using CTRL+W
to select the current word. If you do, find another shortcut that works for that.
/// <reference path="~/scripts/lib"/> | |
$(function() { | |
var auctionHub = $.connection.auctionHub; | |
auctionHub.onBidAccepted = function(itemId, itemName, amount) { | |
$.pnotify({ | |
pnotify_title: "Out bid", | |
pnotify_text: "The new high bid for " + itemName + " is " + amount + ".", | |
pnotify_sticker: false | |
}); | |
}; |
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using SignalR.Hubs; | |
namespace Server | |
{ | |
public class MyHub : Hub | |
{ | |
public void Foo() |
# ... | |
gem 'carrierwave' | |
gem 'fog', '~> 1.0.0' # Need to specify version, as carrierwave references older (0.9.0) which doesn't allow configuration of Rackspace UK Auth URL |
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |