Service | SSL | status | Response Type | Allowed methods | Allowed headers |
---|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'faraday' | |
require 'zlib' | |
module Faraday | |
class Response::Gzip < Response::Middleware | |
def on_complete(env) | |
encoding = env[:response_headers]['content-encoding'].to_s.downcase | |
case encoding | |
when 'gzip' | |
env[:body] = Zlib::GzipReader.new(StringIO.new(env[:body]), encoding: 'ASCII-8BIT').read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export TERM=xterm-color | |
export CLICOLOR=1 | |
export GREP_OPTIONS='--color=auto' | |
# export LSCOLORS=Exfxcxdxbxegedabagacad | |
export LSCOLORS=gxfxcxdxbxegedabagacad # Dark lscolor scheme | |
# Don't put duplicate lines in your bash history | |
export HISTCONTROL=ignoredups | |
# increase history limit (100KB or 5K entries) | |
export HISTFILESIZE=100000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rails generate scaffold BusinessEntry content:string --no-stylesheets --no-fixture --no-test-framework --no-helper --pretend | |
invoke mongoid | |
create app/models/business_entry.rb | |
route resources :business_entries | |
invoke scaffold_controller | |
create app/controllers/business_entries_controller.rb | |
invoke haml | |
create app/views/business_entries | |
create app/views/business_entries/index.html.haml | |
create app/views/business_entries/edit.html.haml |