CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Fri, 08 Aug 2025 00:48:43 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090226095455
location: https://web.archive.org/web/20090226095455/https://github.com/grosser/random_records/tree
server-timing: captures_list;dur=0.962501, exclusion.robots;dur=0.039408, exclusion.robots.policy;dur=0.024216, esindex;dur=0.015277, cdx.remote;dur=159.401255, LoadShardBlock;dur=356.262300, PetaboxLoader3.datanode;dur=121.833289, PetaboxLoader3.resolve;dur=174.323196
x-app-server: wwwb-app28
x-ts: 302
x-tr: 587
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app28; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 301
server: nginx
date: Fri, 08 Aug 2025 00:48:44 GMT
content-type: text/html; charset=utf-8
content-length: 118
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Thu, 26 Feb 2009 09:54:55 GMT
x-archive-orig-connection: close
x-archive-orig-set-cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
x-archive-orig-status: 301 Moved Permanently
location: https://web.archive.org/web/20090226095455/https://github.com/grosser/random_records/tree/master
x-archive-orig-x-runtime: 56ms
x-archive-orig-cache-control: no-cache
x-archive-orig-content-length: 118
cache-control: max-age=1800
memento-datetime: Thu, 26 Feb 2009 09:54:55 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Sat, 03 Jan 2009 02:07:05 GMT", ; rel="prev memento"; datetime="Sun, 04 Jan 2009 12:02:43 GMT", ; rel="memento"; datetime="Thu, 26 Feb 2009 09:54:55 GMT", ; rel="last memento"; datetime="Thu, 26 Feb 2009 09:54:55 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_8_20090226072221_crawl103-c/52_8_20090226095416_crawl101.arc.gz
server-timing: captures_list;dur=1.595559, exclusion.robots;dur=0.058278, exclusion.robots.policy;dur=0.039678, esindex;dur=0.014355, cdx.remote;dur=78.645734, LoadShardBlock;dur=253.123105, PetaboxLoader3.resolve;dur=261.896558, PetaboxLoader3.datanode;dur=121.879345, load_resource;dur=162.217200
x-app-server: wwwb-app28
x-ts: 301
x-tr: 538
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Fri, 08 Aug 2025 00:48:48 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Thu, 26 Feb 2009 09:54:55 GMT
x-archive-orig-connection: close
x-archive-orig-set-cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 126ms
x-archive-orig-etag: "938438f5f5777124ab1ca0cea697d140"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 16595
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Thu, 26 Feb 2009 09:54:55 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Thu, 01 Jan 2009 00:26:55 GMT", ; rel="prev memento"; datetime="Mon, 02 Feb 2009 14:47:01 GMT", ; rel="memento"; datetime="Thu, 26 Feb 2009 09:54:55 GMT", ; rel="next memento"; datetime="Thu, 05 Mar 2009 12:52:50 GMT", ; rel="last memento"; datetime="Fri, 17 Apr 2009 09:08:00 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_8_20090226072221_crawl103-c/52_8_20090226095416_crawl101.arc.gz
server-timing: captures_list;dur=1.654359, exclusion.robots;dur=0.049861, exclusion.robots.policy;dur=0.027724, esindex;dur=0.015290, cdx.remote;dur=3159.573957, LoadShardBlock;dur=218.841994, PetaboxLoader3.datanode;dur=233.201170, PetaboxLoader3.resolve;dur=439.300375, load_resource;dur=462.704536
x-app-server: wwwb-app28
x-ts: 200
x-tr: 3950
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
grosser's random_records at master - GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (

This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (

Description: | Rails Plugin: Adds a efficient random to ActiveRecord |
Clone URL: |
git://github.com/grosser/random_records.git
Give this clone URL to anyone.
git clone git://github.com/grosser/random_records.git
|

grosser (author)
Sun Dec 28 05:38:56 -0800 2008
name | age | message | |
---|---|---|---|
![]() |
README.markdown | Sun Dec 28 05:38:56 -0800 2008 | docs [grosser] |
![]() |
Rakefile.rb | Loading commit data... ![]() |
|
![]() |
init.rb | ||
![]() |
lib/ | ||
![]() |
spec/ | Sun Dec 28 05:29:00 -0800 2008 | refactoring + specs [grosser] |
PROBLEM
- database :order=>'random' is slow
- active record has no random build in
SOLUTION
- Simplified: grab x records from offset rand(count)
INSTALL
script/plugin install git://github.com/grosser/random_records.git
USAGE
Model.random(3) == [Model(id:112),Model(id:113),Model(id:114)]
Model.random(1) == [Model(id:322)]
Model.random == Model(id:234)
AUTHOR
Michael Grosser
grosser.michael@gmail.com
Hereby placed under public domain, do what you want, just do not hold me accountable...
This feature is coming soon. Sit tight!