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
# Purge merged branches
git branch --merged | grep -v "\*" | grep -v master | grep -v staging | grep -v develop | xargs -n 1 git branch -d
@chalmagean
chalmagean / Main.elm
Created June 23, 2016 13:52
elm_validated_form
module Main exposing (..)
import Html.App as Html
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Form exposing (Form)
import Form.Validate as Validate exposing (..)
import Form.Input as Input
type Action
= NoOp
| UpdateProtein String
view : Signal.Address Action -> Model -> Html
view address model =
div [] [
div [] [
input
[ type' "text"
# 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'
# 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
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
# -*- 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"]
" 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 / 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?")
@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
```