Skip to content

Instantly share code, notes, and snippets.

Avatar

Scott Meves stereoscott

View GitHub Profile
@stereoscott
stereoscott / random_text.sql
Created Jun 22, 2014
PostgreSQL random text function
View random_text.sql
-- http://www.postgresql.org/message-id/bddc86150908200534p14723ac2vd1ef223af095d822@mail.gmail.com
CREATE OR REPLACE FUNCTION
random_text(INTEGER)
RETURNS TEXT
LANGUAGE SQL
AS $$
SELECT array_to_string(array(
SELECT SUBSTRING('23456789abcdefghjkmnpqrstuvwxyz'
FROM floor(random()*31)::int+1 FOR 1)
View crash_report.txt
Process: GitX [88336]
Path: /Applications/GitX.app/Contents/MacOS/GitX
Identifier: net.phere.GitX
Version: 0.15.1962 dev (0.15.1962)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: GitX [88336]
User ID: 501
Date/Time: 2014-11-03 03:31:53.855 -0500
View gist:51d5bc0b6299beb4b5a7
gem 'activerecord', '4.1.5'
require 'active_record'
require 'minitest/autorun'
require 'logger'
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Schema.define do