Skip to content

Instantly share code, notes, and snippets.

View gudleik's full-sized avatar
🏠
Working from home

Gudleik Rasch gudleik

🏠
Working from home
  • Drifti
  • Oslo
View GitHub Profile
yarn init -y
yarn add antd@4.2.1
@gudleik
gudleik / .envrc
Last active April 28, 2023 21:25
Node.js direnv setup
# Either use node version specified in package.json
use node package.json
# Or a specific version
use node 5.0.0
# Rest of direnv setup..
export FOO=BAR
$ rails new dummy -O -T --skip-bundle
$ cd dummy
$ rbenv local 1.9.3-p0
$ echo "gem 'thin'" >> Gemfile
$ bundle install --path vendor
$ bundle package
$ sed -i -e "s/serve_static_assets = false/serve_static_assets = true/" config/environments/production.rb
$ rake assets:precompile
$ vmc push dummy --runtime ruby19
class Foo < Apotomo::Widget
cache :display, :my_cache_key
def my_cache_key
{ :site_id => current_site.id,
:article_id => @opts[:id]
}
end
end
Using Ruby-1.9.2-p0 and mail-2.2.6.1
ruby-1.9.2-p0> mail = Mail.new <<-EOT
X-Original-To: support@lvh.me
Return-Path: <foobar@example.org>
Received: from smarthost01.example.org (smarthost01.example.org [91.186.91.50])
by drift.example.org (Postfix) with ESMTP id 9E2792C3418
for <test@chakra.example.org>; Tue, 14 Sep 2010 12:11:08 +0200 (CEST)
From: Foobar <foobar@example.org>
To: "test@foo.example.org" <test@foo.example.org>
# ruby -v
ruby 1.9.2dev (2010-07-11 revision 28618) [x86_64-darwin10.4.0]
# gem list mail
mail (2.2.5)
irb> require 'mail'
irb> source =<<EOT
Received: by 10.220.95.198 with SMTP id e6cs20153vcn;