Question re: should this be rack's job
# config.ru
run ->(env) {
[ 200, { 'Content-Type' => 'text/html', }, [Rack::Request.new(env).params.inspect] ]
}Question re: should this be rack's job
# config.ru
run ->(env) {
[ 200, { 'Content-Type' => 'text/html', }, [Rack::Request.new(env).params.inspect] ]
}| // Wrapping of the example found on https://gist.github.com/alunny/1904992 | |
| // Jordi Moraleda | |
| // This example works on org.apache.cordova.file version 1.1.0 and 1.2.0 | |
| // | |
| // If you are using version 1.3.0, check out the file below | |
| // https://gist.github.com/jmoraleda/78551f439578f7c132c8#file-fswrapper-v1-3-js | |
| function FSWrapper(options, callback) { | |
| var self = this; |
| packages: | |
| yum: | |
| gcc-c++: [] | |
| make: [] | |
| sources: | |
| /home/ec2-user: http://download.redis.io/releases/redis-2.8.4.tar.gz | |
| commands: | |
| redis_build: | |
| command: make | |
| cwd: /home/ec2-user/redis-2.8.4 |
| # Call scopes directly from your URL params: | |
| # | |
| # @products = Product.filter(params.slice(:status, :location, :starts_with)) | |
| module Filterable | |
| extend ActiveSupport::Concern | |
| module ClassMethods | |
| # Call the class methods with names based on the keys in <tt>filtering_params</tt> | |
| # with their associated values. For example, "{ status: 'delayed' }" would call |
| //<editor-fold desc="Node Requires, gulp, etc"> | |
| var gulp = require('gulp'), | |
| autoprefixer = require('gulp-autoprefixer'), | |
| clean = require('gulp-clean'), | |
| concat = require('gulp-concat'), | |
| csso = require('gulp-csso'), | |
| debug = require('gulp-debug'), | |
| footer = require('gulp-footer'), | |
| gutil = require('gulp-util'), | |
| gzip = require('gulp-gzip'), |
| gem 'foreman' | |
| gem 'puma' |
| module Arel | |
| module Predications | |
| def not_eq other | |
| if other.is_a? Nodes::Not | |
| Nodes::Equality.new self, other.value | |
| else | |
| Nodes::NotEqual.new self, other | |
| end | |
| end |
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
| class Ability | |
| include CanCan::Ability | |
| def marshal_dump | |
| #blocks cannot be cached | |
| @rules.reject{|rule| rule.instance_variable_get :@block }.map{|rule| Marshal.dump(rule) } | |
| end | |
| def marshal_load array | |
| #blocks cannot be cached, so blocks must be re-defined | |
| can :read, Comment do |comment| |
Dashing widget to show the status of builds from CircleCI. Also shows the avatar of the person who is running/breaking/passing the current build.
CIRCLE_CI_AUTH_TOKENhttparty to your Gemfile and run bundle installThen: