Skip to content

Instantly share code, notes, and snippets.

Avatar

frankie-loves-jesus

View GitHub Profile
View ginit.vim
" Vera-based font family
" https://dejavu-fonts.github.io/
Guifont DejaVu Sans Mono:h14
" Start maximized
call GuiWindowMaximized(1)
View photo.rb
class Photo < ActiveRecord::Base
ATTACHMENT_STYLES = lambda do |attachment|
# http://stackoverflow.com/a/23513608/69926
# https://github.com/joehilton/hpvideos/blob/master/app/models/attachment.rb
# if is_animated_gif?(attachment)
if attachment.instance.is_animated_gif?
{medium: {format: "flv"}, thumbnail: {format: "png"}}
else
View ImageList.md

Paperclip animated GIF to MP4

Problem: stack level too deep

SystemStackError in Forem::TopicsController#create
stack level too deep

actionpack (4.1.2) lib/action_dispatch/middleware/reloader.rb:79
View Test.md
View Test.md
@frankie-loves-jesus
frankie-loves-jesus / 1 - Test.md
Last active Aug 29, 2015
Forem with PgSearch + Google-like stats
View 1 - Test.md
View new.log
Started GET "/" for ::ffff:80.203.58.233 at 2014-10-17 19:31:58 +0000
ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by Forem::ForumsController#index as HTML
Forem::Category Load (0.7ms) SELECT "forem_categories".* FROM "forem_categories"
Forem::Forum Load (0.3ms) SELECT "forem_forums".* FROM "forem_forums" WHERE "forem_forums"."category_id" = $1 ORDER BY "forem_forums"."name" ASC [["category_id", 1]]
Forem::Category Load (0.2ms) SELECT "forem_categories".* FROM "forem_categories" WHERE "forem_categories"."id" = $1 LIMIT 1 [["id", 1]]
Forem::Post Load (0.3ms) SELECT "forem_posts".* FROM "forem_posts" INNER JOIN "forem_topics" ON "forem_posts"."topic_id" = "forem_topics"."id" WHERE "forem_topics"."forum_id" = $1 AND "forem_posts"."state" = 'approved' ORDER BY forem_posts.created_at DESC LIMIT 1 [["forum_id", 1]]
Forem::Topic L
View typescript
Script started on Fri Oct 17 19:05:57 2014
# rake db:create
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "forem" ENCODING = 'utf8'
/var/lib/gems/1.9.1/gems/activerecord-4.1.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `async_exec'
/var/lib/gems/1.9.1/gems/activerecord-4.1.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
/var/lib/gems/1.9.1/gems/activerecord-4.1.2/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
/var/lib/gems/1.9.1/gems/activesupport-4.1.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/lib/gems/1.9.1/gems/activerecord-4.1.2/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
@frankie-loves-jesus
frankie-loves-jesus / 1 - Test.md
Last active Aug 29, 2015
Forem with PgSearch + Google-like stats
View 1 - Test.md
View new.log
Started GET "/" for ::ffff:80.203.58.233 at 2014-10-17 17:48:59 +0000
ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by Forem::ForumsController#index as HTML
Forem::Category Load (0.3ms) SELECT "forem_categories".* FROM "forem_categories"
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
Forem::Forum Load (0.3ms) SELECT "forem_forums".* FROM "forem_forums" WHERE "forem_forums"."category_id" = ? ORDER BY "forem_forums"."name" ASC [["category_id", 1]]
Forem::Category Load (0.3ms) SELECT "forem_categories".* FROM "forem_categories" WHERE "forem_categories"."id" = ? LIMIT 1 [["id", 1]]
Forem::Post Load (0.5ms) SELECT "forem_posts".* FROM "forem_posts" INNER JOIN "forem_topics" ON "forem_posts"."topic_id" = "forem_topics"."id" WHERE "forem_topics"."forum_id" = ? ORDER B
You can’t perform that action at this time.