Skip to content

Instantly share code, notes, and snippets.

View rossta's full-sized avatar
💭
Being curious

Ross Kaffenberger rossta

💭
Being curious
View GitHub Profile
@lee
lee / maintenance_migrator.rb
Created October 5, 2011 12:42
One way to use Rails Migrations for things other than db:migrate
# This stuff is from a Rails 2 app, but I don't think *too* much has changed in 3.0
class MaintenanceMigrator < ActiveRecord::Migrator
def self.schema_migrations_table_name
"#{super}_maintenance"
end
end
# To Run
MaintenanceMigrator.migrate("db/maintenance/")
@noahd1
noahd1 / Scramble
Created July 14, 2012 12:42
Scramble history
1. Black bear
- went to Newark got a passenger van
- reservation got lost
- Lee, Bryan, Josh, John (w)
vs.
- Noah, Ross, Brenn (l)
- came down to hold 18
2. The links at Shirley
- Noah, Lee, John (w)
@pithyless
pithyless / char_converter.rb
Created September 5, 2012 16:00
Rails middleware to encode characters and avoid exploding controllers
# config/initializers/char_converter.rb
require 'uri'
module Support
class CharConverter
SANITIZE_ENV_KEYS = [
"HTTP_COOKIE", # bad cookie encodings kill rack: https://github.com/rack/rack/issues/225
"HTTP_REFERER",
"PATH_INFO",
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active February 25, 2024 17:35
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

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

@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@chrismccord
chrismccord / upgrade.md
Last active April 7, 2023 12:03
Phoenix 1.2.x to 1.3.0 Upgrade Instructions

If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8

To use the new phx.new project generator, you can install the archive with the following command:

$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

Bump your phoenix dep

Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs:

@nicolasdao
nicolasdao / open_source_licenses.md
Last active April 23, 2024 23:27
What you need to know to choose an open source license.
@gricard
gricard / webpack4upgrade.md
Last active February 29, 2024 20:23
Just some notes about my attempt to upgrade to webpack 4

If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2