#Mac OS X
| # This is example contains the bare mininum to get nginx going with | |
| # Unicorn or Rainbows! servers. Generally these configuration settings | |
| # are applicable to other HTTP application servers (and not just Ruby | |
| # ones), so if you have one working well for proxying another app | |
| # server, feel free to continue using it. | |
| # | |
| # The only setting we feel strongly about is the fail_timeout=0 | |
| # directive in the "upstream" block. max_fails=0 also has the same | |
| # effect as fail_timeout=0 for current versions of nginx and may be | |
| # used in its place. |
This gist was writen in 2012 and it was solving specific problem in Rails & SimpleForm. Some fellow developers were pointing out this may be out dated concept. That's why I advise everyone to read comment section bellow to have a full grasp of alternative solutions
other sources that may be helpful to understand why this may not be best idea:
| # Default setup is given for MySQL with ruby1.8. If you're running Redmine | |
| # with MySQL and ruby1.9, replace the adapter name with `mysql2`. | |
| # Examples for PostgreSQL and SQLite3 can be found at the end. | |
| production: | |
| adapter: mysql2 | |
| database: redmine | |
| host: localhost | |
| username: redmine | |
| password: ****** |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import argparse | |
| try: | |
| from boto.ec2.connection import EC2Connection | |
| except ImportError: | |
| sys.stderr.write('Please install boto ( http://docs.pythonboto.org/en/latest/getting_started.html )\n') | |
| sys.exit(1) |
| #!/usr/bin/env ruby | |
| require 'english' | |
| require 'rubocop' | |
| ADDED_OR_MODIFIED = /A|AM|^M/.freeze | |
| changed_files = `git status --porcelain`.split(/\n/). | |
| select { |file_name_with_status| | |
| file_name_with_status =~ ADDED_OR_MODIFIED |
| <html> | |
| <head> | |
| <title>Test</title> | |
| <script src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
| <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> | |
| <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> | |
| <script src="http://fb.me/react-0.5.1.js"></script> | |
| <script src="http://fb.me/JSXTransformer-0.5.1.js"></script> | |
| </head> |
| /** @jsx React.DOM */ | |
| define(['reactjs'], function(React){ | |
| return React.createClass({ | |
| getDefaultProps: function(){ | |
| return { | |
| multiple: false | |
| /* | |
| name: 'mySelect' |
(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.