Skip to content

Instantly share code, notes, and snippets.


Thomas von Deyen tvdeyen

Block or report user

Report or block tvdeyen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am tvdeyen on github.
  • I am tvdeyen ( on keybase.
  • I have a public key ASBPRvz2kxC1Twc76KaVRVNhklmqAP4woehRSWE7_e99bgo

To claim this, I am signing this object:

tvdeyen / .travis.yml
Created Feb 2, 2017
Downgrade bundler on Travis CI
View .travis.yml
- rvm use @global
- gem uninstall bundler -x
- gem install bundler --version=1.13.7
- bundler --version
tvdeyen / Capfile
Created Nov 3, 2016
AlchemyCMS deployment with Capistrano
View Capfile
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/bundler'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano/alchemy'
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
tvdeyen / seeds.rb
Last active Apr 27, 2018
n Alchemy pages randomly nested
View seeds.rb
# frozen_string_literal: true
require 'alchemy/test_support/factories'
lang_root = FactoryBot.create(:alchemy_page, :language_root)
page_levels = ENV.fetch('PAGE_LEVELS', 10).to_i
pages_per_level = ENV.fetch('PAGES_PER_LEVEL', 100).to_i
parent_ids = []
tvdeyen / error.log
Last active Aug 29, 2015
Passenger spawn error
View error.log
App 849 stdout:
App 849 stderr: sh: 1: env: not found
App 849 stdout:
[ 2015-07-21 22:27:38.9884 801/7f8e3c182700 App/Implementation.cpp:303 ]: Could not spawn process for application /var/www/<username>/html/current: An error occured while starting up the preloader.
Error ID: c03be446
Error details saved to: /tmp/passenger-error-tAHB0D.html
Message from application: Could not find a JavaScript runtime. See for a list of available runtimes. (ExecJS::RuntimeUnavailable)
/var/www/<username>/html/shared/bundle/ruby/2.2.0/gems/execjs-2.5.2/lib/execjs/runtimes.rb:48:in `autodetect'
/var/www/<username>/html/shared/bundle/ruby/2.2.0/gems/execjs-2.5.2/lib/execjs.rb:5:in `<module:ExecJS>'
/var/www/<username>/html/shared/bundle/ruby/2.2.0/gems/execjs-2.5.2/lib/execjs.rb:4:in `<top (required)>'
tvdeyen / _tinymce_enable.html.erb
Created Apr 10, 2015
Enable Alchemy CMS build in TinyMCE for Spree text areas.
View _tinymce_enable.html.erb
<!-- app/views/admin/shared/_tinymce_enable.html.erb -->
<script charset="utf-8">
var tinyMCEPreInit = {
base: '<%= asset_path('tinymce') %>',
suffix: '.min'
$(function() {
View alchemy_models_protected_attributes.rb
module Alchemy
Attachment.attr_accessible :file,
Cell.attr_accessible :page_id, :name
Content.attr_accessible :do_not_index,
tvdeyen / elements.yml
Last active Dec 25, 2015
Creating a "Meet the team page" in Alchemy
View elements.yml
- name: team_member
- name: name
type: EssenceText
- name: position
type: EssenceText
- name: linkedin
type: EssenceLink
- name: bio
type: EssenceRichtext
View char_converter.rb
# config/initializers/char_converter.rb
require 'uri'
module Support
class CharConverter
#"HTTP_COOKIE", # including this will give -> WARNING: Can't verify CSRF token authenticity and kill you session cookies
View elements_controller.rb
module Alchemy
module Admin
class ElementsController < Alchemy::Admin::BaseController
cache_sweeper Alchemy::ContentSweeper, :only => [:create, :update, :destroy]
def index
@page = Page.find(params[:page_id], :include => {:elements => :contents})
@cells = @page.cells
if @cells.blank?
You can’t perform that action at this time.