Skip to content

Instantly share code, notes, and snippets.

View LucasKuhn's full-sized avatar
🧙‍♂️
Casting spells

Lucas Kuhn LucasKuhn

🧙‍♂️
Casting spells
  • Brazil
View GitHub Profile
@jimmywarting
jimmywarting / readme.md
Last active April 30, 2024 21:38
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@kapkaev
kapkaev / gzip.rb
Last active September 13, 2018 17:10
Faraday::Response::Gzip middleware
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
@hernamesbarbara
hernamesbarbara / .bash_profile
Created February 29, 2012 04:59
bash_profile with terminal colors and useful aliases
#!/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
@fortuity
fortuity / gist:468417
Created July 8, 2010 18:46
Options for "rails generate scaffold"
$ 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