Skip to content

Instantly share code, notes, and snippets.

Bogdan Constantinescu bogdanconstantinescu

Block or report user

Report or block bogdanconstantinescu

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
@bogdanconstantinescu
bogdanconstantinescu / sketch-never-ending.md
Created Jul 18, 2017 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial
View sketch-never-ending.md

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
@bogdanconstantinescu
bogdanconstantinescu / Gemfile
Created Sep 13, 2012
Async Sinatra vs Express.js
View Gemfile
source 'https://rubygems.org'
gem 'thin'
gem 'bundler'
gem 'async_sinatra'
gem 'thin'
@bogdanconstantinescu
bogdanconstantinescu / model.rb
Created May 9, 2012
to_slug method for ActiveRecord model
View model.rb
# Hook this up in your ActiveRecord model for a nicer slug
# I use it on before_save :to_slug
def to_slug
# Translate usual characters encountered
convert_map = {
/\@/ => ' at ',
/\&/ => ' and ',
/\%/ => ' percent ',
}
@bogdanconstantinescu
bogdanconstantinescu / application.rb
Created May 9, 2012 — forked from t2/application.rb
Formatting Rails form elements for Twitter Bootstrap error validation
View application.rb
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
html = %(<div class="field_with_errors">#{html_tag}</div>).html_safe
# add nokogiri gem to Gemfile
form_fields = [
'textarea',
'input',
'select'
]
You can’t perform that action at this time.