Skip to content

Instantly share code, notes, and snippets.

View chalmagean's full-sized avatar
💭
Having fun learning new things every single day

Cezar Halmagean chalmagean

💭
Having fun learning new things every single day
View GitHub Profile
<% if obj.errors.any? %>
<div class="row form-errors">
<div class="col-md-12">
<section class="panel">
<div class="panel-body">
<div class="alert alert-warning alert-block fade in">
<button data-dismiss="alert" class="close close-sm" type="button">
<i class="fa fa-times"></i>
</button>
<h4>
@chalmagean
chalmagean / Upgrade from Maveriks to Yosemite
Last active August 29, 2015 14:07
Upgrade from Maveriks to Yosemite
https://developer.apple.com/downloads/index.action
Install XCode 6.1
Install Command line tools OSX 10.10 for Xcode
``
rvm get stable
rvm reinstall ruby-2.0.0-p195
rvm gemset pristine
```
@chalmagean
chalmagean / template.rb
Last active August 29, 2015 14:12
Rails Template
# Here's how you generate the app
# rails new YourNewApp-m template.rb -B -T
# Gems
# ==================================================
# Use unicorn as the app server
gem 'unicorn'
if yes?("Use ExceptionNotifier?")
" Find where a partial is called
" With no arguments it uses the current file name to do the search.
" You can also pass a string to search for and it will do a search for
" a line matching render.*<your_string>
function! GrepPartial(...)
if a:0
let pattern = "render.*" . a:0
else
let filename = substitute(expand("%:t:r:r"), "^_", "", "")
let pattern = "render.*" . filename
@chalmagean
chalmagean / pre-push
Created July 8, 2015 15:57
Pre-Push git hook to run specs before pushing
#!/bin/sh
# Put it in .git/hooks/pre-push
branch=`git rev-parse --abbrev-ref HEAD`
exit_code=$(bundle exec rspec --fail-fast --out /dev/null --format progress > /dev/null 2>/dev/null )$?
if [ $exit_code -gt 0 ]
then echo "Did not push because of failing tests"
fi
# -*- encoding: utf-8 -*-
# stub: alchemy_cms 4.0.0.beta ruby lib
Gem::Specification.new do |s|
s.name = "alchemy_cms"
s.version = "4.0.0.beta"
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib"]
s.authors = ["Thomas von Deyen", "Robin Boening", "Marc Schettke", "Hendrik Mans", "Carsten Fregin"]
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
require 'cucumber/rails'
# Capybara defaults to CSS3 selectors rather than XPath.
# If you'd prefer to use XPath, just uncomment this line and adjust any
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV['RAILS_ENV'] ||= 'test'
require 'spec_helper'
require File.expand_path('../../config/environment', __FILE__)
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!
require "shoulda/matchers"
require 'paperclip/matchers'
require 'vcr'
require 'paper_trail/frameworks/rspec'
type Action
= NoOp
| UpdateProtein String
view : Signal.Address Action -> Model -> Html
view address model =
div [] [
div [] [
input
[ type' "text"