- Preferences -> Variables
- add this to the front of
PATH
:$HOME/.rbenv/bin:$HOME/.rbenv/shims:
- set
TM_RUBY
to this:$HOME/.rbenv/shims/ruby
- populate
RBENV_VERSION
with your version. example:2.1.0-preview1
- (and make sure the checkboxes for each of those variables is selected)
This file contains hidden or 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
class CreateFoos < ActiveRecord::Migration | |
def change | |
create_table :foos do |t| | |
t.timestamps | |
end | |
add_column(:foos, :bar, :json) | |
end | |
end |
This file contains hidden or 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
foo = Foo.new | |
foo.bar = [1,2,3] | |
foo.save | |
foo.reload | |
foo.bar.class # Array | |
foo.bar # [1,2,3] | |
foo.bar = {a:1, b:2} | |
foo.save |
This file contains hidden or 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
AWS.config(:http_open_timeout => 99999, :http_read_timeout => 99999) |
This file contains hidden or 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
<?php | |
function is_subscriber_or_anonymous() { | |
global $current_user; | |
$current_user = wp_get_current_user(); | |
if ( !($current_user instanceof WP_User) ) | |
true; | |
$roles = $current_user->roles; |
This file contains hidden or 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
sudo port -v selfupdate | |
sudo port install rbenv | |
sudo port install ruby-build | |
sudo port install readline | |
RUBY_CONFIGURE_OPTS="--with-readline-dir=/opt/local" rbenv install 2.7.1 | |
# this gist previously also specified the openssl dir, | |
# but these days ruby-build downloads and builds its own openssl for you | |
# --with-openssl-dir=/opt/local |
This file contains hidden or 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
➔ g clone [email protected]:sconover/wrong.git | |
Cloning into 'wrong'... | |
remote: Counting objects: 1838, done. | |
remote: Compressing objects: 100% (1044/1044), done. | |
remote: Total 1838 (delta 795), reused 1793 (delta 754) | |
Receiving objects: 100% (1838/1838), 8.53 MiB | 2.15 MiB/s, done. | |
Resolving deltas: 100% (795/795), done. | |
Checking connectivity... done | |
➔ cd wrong | |
➔ rbenv shell 1.9.3-p385-perf |
This all applies to Ruby 2.1. In some cases a setting is not available in 2.0, this is noted. There is also a different with 1.9, 1.8, and REE --- these are not noted.
All the relevant code is in https://github.com/ruby/ruby/blob/master/gc.c
default: 10000
The number of heap slots to start out with. This should be set high enough so that your app has enough or almost enough memory after loading so that it doesn't have to allocate more memory on the first request (althogh this probably isn't such a big deal for most apps).
(todo: figure out how big a slot is. i think the answer can be infered from this code.)
This file contains hidden or 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
> RUBY_DESCRIPTION | |
=> "jruby 1.7.6 (2.0.0p195) 2013-10-22 6004147 on Java HotSpot(TM) 64-Bit Server VM 1.6.0_65-b14-462-11M4609 [darwin-x86_64]" | |
> User.first.try :devise_mailer | |
NoMethodError: undefined method `devise_mailer' for #<User:0x12d4172e> | |
from org/jruby/RubyBasicObject.java:1497:in `method_missing' |
- You'll need to clone https://developers.kilnhg.com/Code/Trello/Group/TrelloSimple/ (git or Mercurial) into your working directory that contains leaveClosedBoards.py
- Get an api token
- go here and get your Developer Key (ignore that token) https://trello.com/1/appKey/
- visit this url, with your Developer Key inserted as shown https://trello.com/1/authorize?key=YOURDEVELOPERKEY&name=My+Application&expiration=1day&response_type=token&scope=read,write
- grant access, and then get the token that is produced on the next page
- You'll need to add a file in the same directory called settings.py that contains strings for
MY_KEY
,MY_TOKEN
, andUSER_TOKEN
(USER_TOKEN
can be an empty string) - Run the script with the last line commented out to see what boards you're leaving. When you're ready to do it for real, uncomment the last line.