An example showing an isometric rendering in SVG, thanks to three.js.
The example is inspired by this post on using three.js to generate illustrations for scientific papers.
module Paperclip | |
class AutoOrient < Paperclip::Processor | |
def initialize(file, options = {}, *args) | |
@file = file | |
end | |
def make( *args ) | |
dst = Tempfile.new([@basename, @format].compact.join(".")) | |
dst.binmode | |
source 'http://rubygems.org' | |
gem 'activesupport', :require => 'active_support' | |
gem 'actionpack', :require => 'action_pack' | |
gem 'actionmailer', :require => 'action_mailer' | |
gem 'railties', :require => 'rails' | |
gem 'mysql2' | |
DM_VERSION = '~> 1.2.0.rc1' |
$('#glass').mousedown(function(evt){ | |
var $thumb = $('<img src="img/thumbprint.png" class="thumbprint">') | |
.css({top:evt.offsetY-30, left:evt.offsetX-20, opacity:1, rotation:90}) //, "-webkit-transform": "rotate("+((Math.random()*30)-15)+" deg)" | |
.delay(1000) | |
.animate({opacity:0}, 2000, function(){$(this).remove();}); | |
$(this).append($thumb); | |
}); |
#!/usr/bin/env ruby | |
=begin | |
Vimeo Downloader v1.0 by Jaroslaw Zabiello (http://zabiello.com) | |
based on http://cl.ly/2T1x180I251j301L1C3r/vimeo_downloader.sh | |
found thanks to http://goo.gl/AN5sf :) | |
Requirements: | |
* Ruby 1.8 or newer | |
* nokogiri (http://nokogiri.org) |
/** | |
* Converts an RGB color value to HSL. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and l in the set [0, 1]. | |
* | |
* @param Number r The red color value | |
* @param Number g The green color value | |
* @param Number b The blue color value | |
* @return Array The HSL representation |
# Based on: http://donpottinger.net/blog/2014/11/17/bye-bye-heroku-hello-dokku.html | |
# Add to gemfile: | |
ruby '2.1.2' | |
gem 'pg' | |
gem 'puma' | |
gem 'rails_12factor' | |
gem 'searchkick' | |
gem 'typhoeus' |
require 'net/http' | |
require 'json' | |
require 'uri' | |
@token = '' | |
def list_files | |
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago | |
params = { | |
token: @token, |
/* | |
* 0x1ad2 base Gulp.js file | |
* https://twitter.com/0x1ad2 | |
*/ | |
/* | |
* Define plugins | |
*/ | |
var gulp = require('gulp'); | |
var $ = require('gulp-load-plugins')(); |
# Based on: http://donpottinger.net/blog/2014/11/17/bye-bye-heroku-hello-dokku.html | |
# Add to gemfile: | |
ruby '2.1.2' | |
gem 'pg' | |
gem 'puma' | |
gem 'rails_12factor' | |
gem 'searchkick' | |
gem 'typhoeus' |