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
View base.component.ts
import { OnDestroy } from '@angular/core';
import { Subject } from 'rxjs';
export abstract class BaseComponent implements OnDestroy {
public ngDestroyed$ = new Subject();
ngOnDestroy() {
bogdanconstantinescu /
Created Jul 18, 2017 — forked from Bhavdip/
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:
bogdanconstantinescu / Gemfile
Created Sep 13, 2012
Async Sinatra vs Express.js
View Gemfile
source ''
gem 'thin'
gem 'bundler'
gem 'async_sinatra'
gem 'thin'
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 / 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 = do |html_tag, instance|
html = %(<div class="field_with_errors">#{html_tag}</div>).html_safe
# add nokogiri gem to Gemfile
form_fields = [
You can’t perform that action at this time.