start new:
tmux
start new with session name:
tmux new -s myname
require 'haml' | |
class ErbEngine < Haml::Engine | |
def push_script(text, preserve_script, in_tag = false, preserve_tag = false, | |
escape_html = false, nuke_inner_whitespace = false) | |
push_text "<%= #{text.strip} %>" | |
end | |
def push_silent(text, can_suppress = false) | |
push_text "<% #{text.strip} %>" |
#app/models/event.rb | |
class Event < ActiveRecord::Base | |
translates :title, :description | |
has_many :event_translations | |
accepts_nested_attributes_for :event_translations, :allow_destroy => true | |
end |
module FactoryGirl | |
module Strategy | |
class Cache | |
def association(runner) | |
runner.run(:cache) | |
end | |
def result(evaluation) | |
repository.read(evaluation) || repository.store(evaluation) | |
end |
<?xml version="1.0"?> | |
<root> | |
<appdef> | |
<appname>Terminal</appname> | |
<equal>com.apple.Terminal</equal> | |
</appdef> | |
<item> | |
<name>TMUX Key Remappings</name> | |
<item> | |
<name>TMUX: Right Control to Ctrl+B</name> |
This is a brain dump of my experience trying to get something going with Ember.js. My goal was to get to know the ins and outs of the framework by completing a pretty well defined task that I had lots of domain knowledge about. In this case reproducing a simple Yammer feed. As of this time, I have not been able to complete that task. So this is a subjective rundown of the things I think make it difficult to get a handle on Ember. NOTE: My comments are addressing the Ember team and giving suggestions on what they could do to improve the situation.
The new guides have pretty good explanation of the various parts of the framework; routers, models, templates, views. But it's not clear how they all get strapped together to make something that works. There are snippets of examples all over the place like:
App.Router.map(function() {
match('/home').to('home');
});
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This list is based on aliases_spec.rb.
You can see also Module: RSpec::Matchers API.
matcher | aliased to | description |
---|---|---|
a_truthy_value | be_truthy | a truthy value |
a_falsey_value | be_falsey | a falsey value |
be_falsy | be_falsey | be falsy |
a_falsy_value | be_falsey | a falsy value |
#!/bin/bash | |
echo | |
echo "This script sets the pantheon terminal to the Solarized theme." | |
echo | |
until [[ $scheme -eq 1 ]] || [[ $scheme -eq 2 ]] || [[ $scheme -eq 3 ]]; do | |
echo "Choose one:" | |
echo "1) Light" | |
echo "2) Dark" |