Vacuum with Rails
Goal: Displaying products from the Amazon Product Advertising API.
" Vera-based font family | |
" https://dejavu-fonts.github.io/ | |
Guifont DejaVu Sans Mono:h14 | |
" Start maximized | |
call GuiWindowMaximized(1) |
Goal: Displaying products from the Amazon Product Advertising API.
> canvas@1.1.2 install /home/myapp/my_node_app/node_modules/canvas
> node-gyp rebuild
make: Entering directory `/home/myapp/my_node_app/node_modules/canvas/build'
CXX(target) Release/obj.target/canvas/src/Canvas.o
In file included from ../src/Canvas.cc:19:0:
../src/JPEGStream.h:11:21: fatal error: jpeglib.h: No such file or directory
MKTEMP(1) OpenBSD Reference Manual MKTEMP(1) | |
NAME | |
mktemp - make temporary filename (unique) | |
SYNOPSIS | |
mktemp [-dqtu] [-p directory] [template] | |
DESCRIPTION | |
The mktemp utility takes the given filename template and overwrites a |
rvm install fails with rvm HEAD on OpenBSD 5.4: | |
``` | |
% rvm install 1.9.3 | |
Searching for binary rubies, this might take some time. | |
No binary rubies available for: openbsd/5.4/i386/ruby-1.9.3-p448. | |
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. | |
Checking requirements for openbsd. | |
Installing requirements for openbsd. | |
Updating system - please wait |
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 |
Go to Default
and then the latest post. Alternatively log in with email admin@example.com
and password admin1234
and upload an animated GIF yourself.
photo.rb
views/forem/topics/show.html.erb
<%= render partial: "forem/posts/post", collection: topic.desc_posts, locals: { topic: @topic } %>