Skip to content

Instantly share code, notes, and snippets.

View leemour's full-sized avatar

Viacheslav Ptsarev leemour

  • Blinkist
  • Valencia, Spain
View GitHub Profile

Rich Text Editing

External Links

  • WYSIWYG HTML
    • TinyMCE
      • looks like bootstrap
      • license: LGPL
      • integrates with Plupload for file uploading (PHP only)
  • integrates with MoxieManager for file management (PHP only)
# A formtastic input which incorporates carrierwave uploader functionality.
#
# Intelligently adds the cache field, displays and links to the current
# value if there is one, adds a class to the wrapper when replacing an
# existing value, allows removing an existing value with the checkbox
# taking into account validation requirements.
#
# There are several options:
#
# * Toggle the replacement field with `replaceable: true/false`.
#!/usr/bin/env rvm 1.9.3@mygemset do ruby
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active June 30, 2026 18:13
A badass list of frontend development resources I collected over time.
@leemour
leemour / Zsh & theme
Last active April 12, 2023 08:53
Zsh installation and Agnoster theme settings
# Railscast
http://railscasts.com/episodes/308-oh-my-zsh
# Install Zsh
sudo apt-get update && sudo apt-get install zsh
# Install Oh-my-zsh
wget –no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O – | sh
# Make ZSH default shell
@leemour
leemour / application_controller.rb
Created May 31, 2013 16:48 — forked from gonzedge/application_controller.rb
Rails 404 and 500 error pages
class ApplicationController < ActionController::Base
# ...
unless Rails.application.config.consider_all_requests_local
rescue_from Exception, with: lambda { |exception| render_error 500, exception }
rescue_from ActionController::RoutingError, ActionController::UnknownController, ::AbstractController::ActionNotFound, ActiveRecord::RecordNotFound, with: lambda { |exception| render_error 404, exception }
end
private
def render_error(status, exception)
anonymous
anonymous / structure.html
Created May 29, 2013 13:18
Created with SassBin
<h2>A thumbnail grid with <a href="https://github.com/Team-Sass/Singularity">Singularity</a> and <a href="https://github.com/lolmaus/breakpoint-slicer">Breakpoint Slicer</a></h2>
<p>Play with the Page pane width to see the responsive magic!</p>
<div class=grid-item>
<div class=thumbnail>
<div class=thumbnail-content>
Thumbnail
</div>
</div>
</div>
@leemour
leemour / Heroku copy DB
Last active December 17, 2015 18:29
Copying development Sqlite DB to Heroku (Postgresql)
# Чтобы избежать ошибки Taps Server Error: PGError: ERROR: time zone displacement out of range надо изменить версию Ruby
rvm use 1.9.2-p320
heroku db:push
# OR
heroku db:push sqlite://db/development.db