Already a member? Log in

Sign up with your...

or

Sign Up with your email address

Add Tags

Duplicate Tags

Rename Tags

Share It With Others!

Save Link

Sign in

Sign Up with your email address

Sign up

By clicking the button, you agree to the Terms & Conditions.

Forgot Password?

Please enter your username below and press the send button.
A password reset link will be sent to you.

If you are unable to access the email address originally associated with your Delicious account, we recommend creating a new account.

ADVERTISEMENT
ADVERTISEMENT

Links 1 through 10 of 1703 Sfinktah BUngholio's Bookmarks

This article covers less common SSH use cases, such as:

using passwordless, key-based login;
setting up local per-host configurations;
exporting a local service through a firewall;
accessing a remote service through a firewall;
setting up a SOCKS proxy for Firefox;
executing commands remotely from scripts;
transfering files to/from remote machines;
mounting a filesystem through SSH; and
triggering admin scripts from a phone.

Share It With Others!

If you wrote an application tracking sales between individuals (lets call it railsbay) you might have a table called sales and in that table you’d need to track the buyer and the seller. Both buyer and seller should be objects from the users table, and we’ve got two columns that refer to them: buyer_id and seller_id.

Share It With Others!

n Rails, an association is a connection between two Active Record models. Why do we need associations between models? Because they make common operations simpler and easier in your code. For example, consider a simple Rails application that includes a model for authors and a model for books.

Share It With Others!

Single-table inheritance (STI) is the practice of storing multiple types of values in the same table, where each record includes a field indicating its type, and the table includes a column for every field of all the types it stores. In Rails, the type column is used to determine which type of model to instantiate for each row; a row with type = 'Article' will make Rails call Article.new when turning that row into an object.

Share It With Others!

You can use them with Rails 4 now, they should work mostly out of the box. In your migrations you need to do:

t.string :tags, array: true, default: []
...
# and use your model
Post.create!(body: "AmberBit", tags: ["ruby", "rails", "development", "company"])
...
# and query it:
Post.where('tags @> ARRAY[?]', ['ruby', 'development'])
Read more about arrays in Rails here or here.

If you add ‘postgres_ext’ gem to your Gemfile, you can query it with nicer syntax.

Share It With Others!

Everything initialized in the module pattern happens when Foo is declared. Additionally, the module pattern can be used to initialize a constructor, which could then be instantiated multiple times. While the module pattern is the right tool for many jobs, it's not equivalent to a singleton.

Share It With Others!

HTML Imports, part of the Web Components cast, is a way to include HTML documents in other HTML documents. You're not limited to markup either. An import can also include CSS, JavaScript, or anything else an .html file can contain. In other words, this makes imports a fantastic tool for loading related HTML/CSS/JS.

Share It With Others!

The get propertyname () syntax works on object literals and in the previous example I assigned an object literal to Product.prototype. This is OK, but using object literals like this makes it harder to chain prototypes to get inheritance. You can create getters and setters on a prototype without an object literal using defineProperty.

Share It With Others!

Share It With Others!

When an exception is raised, two pieces of information are captured: one is the state of the processor at the time of the exception, which is stored in a CONTEXT structure3). The other is information about the exception, which is stored in an EXCEPTION_RECORD. The two parts of this structure we'll be concerned about are the ExceptionCode member and the ExceptionInformation array, which contain a numeric value for the exception type and additional information respectively.

Share It With Others!

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT