Skip to content

Instantly share code, notes, and snippets.

@rkallensee
rkallensee / gem_licenses_to_csv.rb
Last active May 10, 2019 07:59
Write all Ruby gem dependencies with their licenses into a CSV file
require 'csv'
csv_path = Rails.root.join("#{Rails.application.class.parent.name.underscore.dasherize}_licenses.csv")
CSV.open(csv_path, 'wb') do |csv|
csv << ['Gem', 'Licenses']
Gem.loaded_specs.each do |gem_name, spec|
csv << [gem_name, spec.licenses.join(', ')]
end
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active November 3, 2024 17:14
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

module YourApp
class Application < Rails::Application
# Convenience for loading config/foo.yml for the current Rails env.
#
# Example:
#
# config/cleversafe.yml:
#
# production:
# url: http://127.0.0.1:8080
@schickling
schickling / Rakefile
Last active November 5, 2024 09:14
Activerecord without Rails
require "active_record"
namespace :db do
db_config = YAML::load(File.open('config/database.yml'))
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'})
desc "Create the database"
task :create do
ActiveRecord::Base.establish_connection(db_config_admin)